]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix erroneous use of archive_string_empty() macro
authorMartin Matuska <martin@matuska.org>
Sun, 12 Jan 2020 07:52:33 +0000 (08:52 +0100)
committerMartin Matuska <martin@matuska.org>
Sun, 12 Jan 2020 08:08:09 +0000 (09:08 +0100)
Found by LGTM.com code analysis

libarchive/archive_read_disk_posix.c

index 183ca1e8790d7ac0abd5fe17c470c7bd83212279..f7c96bffa91c2b86053d1a765cc4422af89a7dbe 100644 (file)
@@ -1110,8 +1110,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                            "%s", delayed_str.s);
                }
        }
-       if (!archive_string_empty(&delayed_str))
-               archive_string_free(&delayed_str);
+       archive_string_free(&delayed_str);
 
        return (r);
 }