summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-18 18:18:39 +0200
committerDan McGee <dan@archlinux.org>2011-08-19 16:41:55 +0200
commit1723e6dc4f8eff8aaa1e0f7560800c76e85f3009 (patch)
tree717d0db2db96b179c659df627d662fc115a36924
parent16334f778b59ebf831c15640db2fe9706e7c9615 (diff)
downloadpacman-1723e6dc4f8eff8aaa1e0f7560800c76e85f3009.tar.gz
pacman-1723e6dc4f8eff8aaa1e0f7560800c76e85f3009.tar.xz
lib/dload: prevent possible NULL dereference
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/dload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 5464740a..37989370 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -396,7 +396,7 @@ cleanup:
}
}
- if((ret == -1 || dload_interrupted) && should_unlink) {
+ if((ret == -1 || dload_interrupted) && should_unlink && tempfile) {
unlink(tempfile);
}