From: Daniel Stenberg Date: Sat, 29 Jan 2005 23:46:27 +0000 (+0000) Subject: Clear the urlglob struct when allocated, since we might otherwise use X-Git-Tag: curl-7_13_0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7f51ebeab8ac78e654e83dfb7febb84bf540147;p=thirdparty%2Fcurl.git Clear the urlglob struct when allocated, since we might otherwise use uninitialized variables. Pointed out to us by the friendly Valgrind. --- diff --git a/src/urlglob.c b/src/urlglob.c index 64d7007838..018f0e41d4 100644 --- a/src/urlglob.c +++ b/src/urlglob.c @@ -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;