Skip to content
Snippets Groups Projects
Commit c7f51ebe authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Clear the urlglob struct when allocated, since we might otherwise use

uninitialized variables. Pointed out to us by the friendly Valgrind.
parent 9a820d7a
No related branches found
No related tags found
No related merge requests found
......@@ -314,7 +314,7 @@ int glob_url(URLGlob** glob, char* url, int *urlnum, FILE *error)
if(NULL == glob_buffer)
return CURLE_OUT_OF_MEMORY;
glob_expand = (URLGlob*)malloc(sizeof(URLGlob));
glob_expand = (URLGlob*)calloc(sizeof(URLGlob), 1);
if(NULL == glob_expand) {
free(glob_buffer);
return CURLE_OUT_OF_MEMORY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment