[pacman-dev] [PATCH 1/3] lib/libalpm/signing.c: Fix memory leak in decode_signature() in case of error.
Dan McGee
dpmcgee at gmail.com
Sun Aug 28 20:51:20 EDT 2011
On Sat, Aug 27, 2011 at 4:03 PM, Diogo Sousa <diogogsousa at gmail.com> wrote:
> Signed-off-by: Diogo Sousa <diogogsousa at gmail.com>
Thanks, applied.
> ---
> lib/libalpm/signing.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
> index 8db4a7b..67f7adf 100644
> --- a/lib/libalpm/signing.c
> +++ b/lib/libalpm/signing.c
> @@ -175,6 +175,7 @@ static int decode_signature(const char *base64_data,
> size_t destlen = len * 3 / 4;
> MALLOC(*data, destlen, goto error);
> if(base64_decode(*data, &destlen, usline, len)) {
> + free(*data);
> goto error;
> }
> *data_len = destlen;
> --
> 1.7.6.1
>
>
>
More information about the pacman-dev
mailing list