libalpm/remove.c: prevent undefined behaviour in shift_pacsave error path
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
2ba08e622b
commit
f996f30163
1 changed files with 3 additions and 1 deletions
|
@ -420,7 +420,9 @@ static void shift_pacsave(alpm_handle_t *handle, const char *file)
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
free(dirname);
|
free(dirname);
|
||||||
|
if(dir != NULL) {
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue