diff options
author | Werner Koch <[email protected]> | 2016-06-23 15:44:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-06-23 18:01:15 +0000 |
commit | c229ba4d8b9b16052ee0b9573bed7905be602cdf (patch) | |
tree | 4118e0b9cc02a46cc3fc3e72931dd26ff872f4c2 | |
parent | tests/openpgp: Fake the system time for the tofu test. (diff) | |
download | gnupg-c229ba4d8b9b16052ee0b9573bed7905be602cdf.tar.gz gnupg-c229ba4d8b9b16052ee0b9573bed7905be602cdf.zip |
common: Fix possible small memory leak in b64dec.c.
* common/b64dec.c (b64dec_finish): Always release TITLE.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/b64dec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/b64dec.c b/common/b64dec.c index 9e8fb7857..c84c35ada 100644 --- a/common/b64dec.c +++ b/common/b64dec.c @@ -243,10 +243,11 @@ b64dec_proc (struct b64state *state, void *buffer, size_t length, gpg_error_t b64dec_finish (struct b64state *state) { + xfree (state->title); + state->title = NULL; + if (state->lasterr) return state->lasterr; - xfree (state->title); - state->title = NULL; return state->invalid_encoding? gpg_error(GPG_ERR_BAD_DATA): 0; } |