Skip to content

Commit 9f08eae

Browse files
jacobmealeybagder
authored andcommitted
free all curl_slists and curl_easy_escape response
1 parent 2cb2bf8 commit 9f08eae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

urler.c

+5
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ static void pathadd(struct option *o, const char *path)
136136
if(n) {
137137
o->append_path = n;
138138
}
139+
free(urle);
139140
}
140141
}
141142

@@ -159,6 +160,7 @@ static void queryadd(struct option *o, const char *query)
159160
if(n) {
160161
o->append_query = n;
161162
}
163+
free(urle);
162164
}
163165
}
164166

@@ -483,6 +485,9 @@ int main(int argc, const char **argv)
483485
} while(node);
484486
/* we're done with libcurl, so clean it up */
485487
curl_slist_free_all(o.url_list);
488+
curl_slist_free_all(o.set_list);
489+
curl_slist_free_all(o.append_path);
490+
curl_slist_free_all(o.append_query);
486491
curl_global_cleanup();
487492
return exit_status;
488493
}

0 commit comments

Comments
 (0)