fix possible memory leak
This commit is contained in:
1 parent
c7c88e9c59
commit
81ea4feb2e
1 file changed
+1
-1
@@ -45,7 +45,7 @@ static int build_url (char **url, const char *host, int port, const char *path)
|
||||
assert (path != NULL);
|
||||
|
||||
len = strlen (host) + strlen (path) + 14;
|
||||
*url = (char *) safemalloc (len);
|
||||
*url = (char *) saferealloc (*url, len);
|
||||
if (*url == NULL)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in new issue
Block a user