From d709ec0b07e9d7eb8ceeb8c095f7f6d4f25d574e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 19 Apr 2018 15:47:05 +0200 Subject: ftplistparser: keep state between invokes Regression from f786d1f14 Reported-by: wncboy on github Fixes #2445 Closes #2508 --- lib/wildcard.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/wildcard.c') diff --git a/lib/wildcard.c b/lib/wildcard.c index cb88ab72f..8ba0989b4 100644 --- a/lib/wildcard.c +++ b/lib/wildcard.c @@ -30,9 +30,15 @@ #include "curl_memory.h" #include "memdebug.h" +static void fileinfo_dtor(void *user, void *element) +{ + (void)user; + Curl_fileinfo_cleanup(element); +} + CURLcode Curl_wildcard_init(struct WildcardData *wc) { - Curl_llist_init(&wc->filelist, Curl_fileinfo_dtor); + Curl_llist_init(&wc->filelist, fileinfo_dtor); wc->state = CURLWC_INIT; return CURLE_OK; -- cgit v1.2.1