]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Bug #1128: Deletion of unnecessary checks before calls of the function “free”
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 4 Feb 2019 17:38:18 +0000 (18:38 +0100)
committerMarkus Elfring <elfring@users.sourceforge.net>
Mon, 4 Feb 2019 17:38:18 +0000 (18:38 +0100)
commit429189f00d9deb760cf2c271dc363f4271e0cf73
tree452b7c51aaf48b2a7a308c75fd765de8c8c70c2e
parent4bc5892128a042780f167ac35aa72f63c426f3b7
Bug #1128: Deletion of unnecessary checks before calls of the function “free”

The function “free” is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software “Coccinelle 1.0.7”.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
15 files changed:
contrib/shar/tree.c
libarchive/archive_acl.c
libarchive/archive_disk_acl_sunos.c
libarchive/archive_entry.c
libarchive/archive_read_open_file.c
libarchive/archive_read_support_format_7zip.c
libarchive/archive_read_support_format_ar.c
libarchive/archive_read_support_format_cpio.c
libarchive/archive_read_support_format_iso9660.c
libarchive/archive_read_support_format_rar5.c
libarchive/archive_read_support_format_xar.c
libarchive/archive_read_support_format_zip.c
libarchive/archive_write_disk_set_standard_lookup.c
libarchive/archive_write_set_format_shar.c
test_utils/test_main.c