summaryrefslogtreecommitdiff
path: root/ticket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ticket.c')
-rw-r--r--ticket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ticket.c b/ticket.c
index 2751b37..6290dcb 100644
--- a/ticket.c
+++ b/ticket.c
@@ -21,6 +21,11 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb
line = strtok(NULL, "\n");
do {
(*listptr)->length++;
+ if (!strcmp(line, "No matching results.")) {
+ free(*listptr);
+ *listptr = NULL;
+ return realsize;
+ }
} while ((line = strtok(NULL, "\n")));
rtclient_ticketlist *ptr = realloc(*listptr, sizeof(*listptr)
+ (*listptr)->length * sizeof(char *));