diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-02-02 09:47:25 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-02-02 09:53:57 -0600 |
commit | 05ace838b3f67836a29a53282ec5a9b3cffd5680 (patch) | |
tree | 69cf5cbf1748e43c229318197a0f68f7f7038ad7 /lib | |
parent | b4c52d8ad4a063d05100980f895e330ff6076de5 (diff) | |
download | gnutls-05ace838b3f67836a29a53282ec5a9b3cffd5680.tar.gz |
session_pack: fix leak in error path
If called at the wrong time, it allocates the buffer sb and forgets to
clear it.
Signed-off-by: Michael Catanzaro <mcatanzaro@gnome.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/session_pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/session_pack.c b/lib/session_pack.c index b655b71289..e5c21f24b5 100644 --- a/lib/session_pack.c +++ b/lib/session_pack.c @@ -143,7 +143,8 @@ _gnutls_session_pack(gnutls_session_t session, } break; default: - return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); + ret = gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); + goto fail; } |