diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-29 23:46:27 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-29 23:46:27 +0000 |
commit | c7f51ebeab8ac78e654e83dfb7febb84bf540147 (patch) | |
tree | 4fdfe35c5731a75c33140189868a5e86026cf8f7 | |
parent | 9a820d7a987dab462fef32ca1b4ca5ecfd20c19a (diff) |
Clear the urlglob struct when allocated, since we might otherwise use
uninitialized variables. Pointed out to us by the friendly Valgrind.
-rw-r--r-- | src/urlglob.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/urlglob.c b/src/urlglob.c index 64d700783..018f0e41d 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; |