summaryrefslogtreecommitdiffstats
path: root/src/core/uri.c
diff options
context:
space:
mode:
authorHolger Lubitz2007-06-18 01:24:51 +0200
committerHolger Lubitz2007-07-06 20:42:05 +0200
commit6def8592ed406e4ecc3289f22039bf3cdfdcf05c (patch)
treec88edb4bd012c45ef7638908d10814cf8458d379 /src/core/uri.c
parentconvert to zalloc (diff)
downloadipxe-6def8592ed406e4ecc3289f22039bf3cdfdcf05c.tar.gz
ipxe-6def8592ed406e4ecc3289f22039bf3cdfdcf05c.tar.xz
ipxe-6def8592ed406e4ecc3289f22039bf3cdfdcf05c.zip
convert to zalloc
Diffstat (limited to 'src/core/uri.c')
-rw-r--r--src/core/uri.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/uri.c b/src/core/uri.c
index 8cb855a6..3b3cf85b 100644
--- a/src/core/uri.c
+++ b/src/core/uri.c
@@ -77,13 +77,12 @@ struct uri * parse_uri ( const char *uri_string ) {
/* Allocate space for URI struct and a copy of the string */
raw_len = ( strlen ( uri_string ) + 1 /* NUL */ );
- uri = malloc ( sizeof ( *uri ) + raw_len );
+ uri = zalloc ( sizeof ( *uri ) + raw_len );
if ( ! uri )
return NULL;
raw = ( ( ( char * ) uri ) + sizeof ( *uri ) );
/* Zero URI struct and copy in the raw string */
- memset ( uri, 0, sizeof ( *uri ) );
memcpy ( raw, uri_string, raw_len );
/* Start by chopping off the fragment, if it exists */