From: Joerg Sonnenberger Date: Tue, 20 May 2008 16:36:18 +0000 (-0400) Subject: Just as archive_entry_free, recognize NULL strings as noops. X-Git-Tag: v2.6.0~218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0ba3be08a7c110ceb32ca45f82763c4ffa3e6c4;p=thirdparty%2Flibarchive.git Just as archive_entry_free, recognize NULL strings as noops. SVN-Revision: 74 --- diff --git a/libarchive/archive_entry_link_resolver.c b/libarchive/archive_entry_link_resolver.c index e0e1bb7e5..c0770c239 100644 --- a/libarchive/archive_entry_link_resolver.c +++ b/libarchive/archive_entry_link_resolver.c @@ -148,6 +148,9 @@ archive_entry_linkresolver_free(struct archive_entry_linkresolver *res) { struct links_entry *le; + if (res == NULL) + return; + if (res->buckets != NULL) { while ((le = next_entry(res)) != NULL) archive_entry_free(le->entry);