diff options
author | Saurav Babu <saurav.babu@samsung.com> | 2015-06-18 12:50:32 +0530 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-06-18 13:26:36 +0200 |
commit | b0c5ba7b3d3779060f7e6cc685bc4098e9dab680 (patch) | |
tree | abf6c03f080e809b831bf1ff7100d77067386670 /src/cli.c | |
parent | 53b7883d29620b77efb3ff3c5cf58c0099f297b4 (diff) | |
download | gnutls-b0c5ba7b3d3779060f7e6cc685bc4098e9dab680.tar.gz |
gnutls-cli: Fixed Possible Memory Leak
This patch fixes possible memory leak in psk_callback() function, rawkey
is allocated memory by gnutls_malloc() and is not freed when
gnutls_hex_decode() returns with error
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1714,6 +1714,7 @@ psk_callback(gnutls_session_t session, char **username, if (ret < 0) { fprintf(stderr, "Error deriving password: %s\n", gnutls_strerror(ret)); + gnutls_free(rawkey); gnutls_free(*username); return ret; } |