diff options
author | Allan McRae <allan@archlinux.org> | 2014-12-24 01:37:28 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-12-24 02:19:30 +0100 |
commit | 52d2ff648d2d6672b7a6458b76f639388f32d3df (patch) | |
tree | a3e0ac49b24c2d569244f7702f0cc1fe06873305 /lib | |
parent | 123ecb8e07a6489ceb2fc2e89f4ef62370aaf5bf (diff) | |
download | pacman-52d2ff648d2d6672b7a6458b76f639388f32d3df.tar.gz pacman-52d2ff648d2d6672b7a6458b76f639388f32d3df.tar.xz |
create_tempfile: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/dload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index e3409f99..c5186bef 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -379,7 +379,7 @@ static FILE *create_tempfile(struct dload_payload *payload, const char *localpat payload->tempfile_name = randpath; free(payload->remote_name); STRDUP(payload->remote_name, strrchr(randpath, '/') + 1, - RET_ERR(payload->handle, ALPM_ERR_MEMORY, NULL)); + fclose(fp); RET_ERR(payload->handle, ALPM_ERR_MEMORY, NULL)); return fp; } |