mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +03:00
vfs/netutil.c: fix 'retval' memory leak in vfs_split_url when unbalanced '[' occurs
Thanks to cppckeck: [./vfs/netutil.c:154]: (error) Memory leak: retval Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
parent
c03ade3252
commit
e9991314cf
@ -149,6 +149,7 @@ vfs_split_url (const char *path, char **host, char **user, int *port,
|
|||||||
colon++;
|
colon++;
|
||||||
} else {
|
} else {
|
||||||
g_free (pcopy);
|
g_free (pcopy);
|
||||||
|
g_free (retval);
|
||||||
*host = NULL;
|
*host = NULL;
|
||||||
*port = 0;
|
*port = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user