mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
create_tempfile: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
123ecb8e07
commit
52d2ff648d
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user