summaryrefslogtreecommitdiff
path: root/ticket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ticket.c')
-rw-r--r--ticket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ticket.c b/ticket.c
index 3fb328c..2e26b81 100644
--- a/ticket.c
+++ b/ticket.c
@@ -61,10 +61,12 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb
return realsize;
}
} while ((line = strtok(NULL, "\n")));
+
rtclient_ticketlist *ptr = realloc(*listptr, sizeof(*listptr)
- + (*listptr)->length * sizeof(char *));
+ + (*listptr)->length * sizeof(rtclient_ticket));
*listptr = ptr;
rtclient_ticketlist *list = *listptr;
+
char *linesaveptr = NULL;
line = strtok_r(lines, "\n", &linesaveptr);
line = strtok_r(NULL, "\n", &linesaveptr);