mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
common: Fix possible small memory leak in b64dec.c.
* common/b64dec.c (b64dec_finish): Always release TITLE. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e584d6468a
commit
c229ba4d8b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user