lib/dload: prevent possible NULL dereference

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2011-08-18 12:18:39 -04:00 committed by Dan McGee
parent 16334f778b
commit 1723e6dc4f
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ cleanup:
}
}
if((ret == -1 || dload_interrupted) && should_unlink) {
if((ret == -1 || dload_interrupted) && should_unlink && tempfile) {
unlink(tempfile);
}