CURLcode Curl_wildcard_init(struct WildcardData *wc)
{
+ DEBUGASSERT(wc->filelist == NULL);
/* now allocate only wc->filelist, everything else
will be allocated if it is needed. */
wc->filelist = Curl_llist_alloc(Curl_fileinfo_dtor);
if(wc->tmp_dtor) {
wc->tmp_dtor(wc->tmp);
+ wc->tmp_dtor = ZERO_NULL;
wc->tmp = NULL;
}
+ DEBUGASSERT(wc->tmp == NULL);
if(wc->filelist) {
Curl_llist_destroy(wc->filelist, NULL);
free(wc->pattern);
wc->pattern = NULL;
}
+
wc->customptr = NULL;
+ wc->state = CURLWC_INIT;
}