projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a820d7
)
Clear the urlglob struct when allocated, since we might otherwise use
author
Daniel Stenberg
<daniel@haxx.se>
Sat, 29 Jan 2005 23:46:27 +0000
(23:46 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Sat, 29 Jan 2005 23:46:27 +0000
(23:46 +0000)
uninitialized variables. Pointed out to us by the friendly Valgrind.
src/urlglob.c
patch
|
blob
|
history
diff --git
a/src/urlglob.c
b/src/urlglob.c
index
64d7007
..
018f0e4
100644
(file)
--- 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;