summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2008-05-19 18:09:26 +0000
committercperciva <cperciva@FreeBSD.org>2008-05-19 18:09:26 +0000
commitee71b68b4b3efcbeaea6adea17bcdf960a85c562 (patch)
tree25e171a93deb9b50712d51d3e655f302abeba254
parenta13d33881dcb5be5c8826d3c8414aab9dafb0728 (diff)
downloadFreeBSD-src-ee71b68b4b3efcbeaea6adea17bcdf960a85c562.zip
FreeBSD-src-ee71b68b4b3efcbeaea6adea17bcdf960a85c562.tar.gz
There's no way for entry to possibly be NULL at the end of write_entry
(in fact, there has never been any way for it to be NULL, going all the way back to revision 1.1 of this file), so remove the check and unconditionally free entry. Found by: Coverity Prevent
-rw-r--r--usr.bin/tar/write.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
index ec83b60..8fe0530 100644
--- a/usr.bin/tar/write.c
+++ b/usr.bin/tar/write.c
@@ -932,8 +932,7 @@ abort:
if (fd >= 0)
close(fd);
- if (entry != NULL)
- archive_entry_free(entry);
+ archive_entry_free(entry);
}
OpenPOWER on IntegriCloud