diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-15 11:11:54 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-15 11:11:54 +0100 |
commit | 9c29935f3ca274d002517ed09e17921e42dbaf21 (patch) | |
tree | c752ee1c28a46e387a64b32663eb54e63f727e8b | |
parent | 097f8dcde5c212d91bf25ed9256860cb2b8bfa3d (diff) | |
download | netsurf-9c29935f3ca274d002517ed09e17921e42dbaf21.tar.gz netsurf-9c29935f3ca274d002517ed09e17921e42dbaf21.tar.bz2 |
HTTP Auth: Squash error path leaks.
-rw-r--r-- | desktop/netsurf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 3757a2a34..8785a98a8 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -146,6 +146,8 @@ static nserror netsurf__unpack_userpass( username = malloc(1); password = malloc(1); if (username == NULL || password == NULL) { + free(username); + free(password); return NSERROR_NOMEM; } username[0] = '\0'; @@ -167,6 +169,8 @@ static nserror netsurf__unpack_userpass( username = malloc(len + 1); password = malloc(len2 + 1); if (username == NULL || password == NULL) { + free(username); + free(password); return NSERROR_NOMEM; } memcpy(username, userpass, len); |