]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
uu: Remove unneeded code
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 1 Jun 2026 20:52:56 +0000 (22:52 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 1 Jun 2026 20:52:56 +0000 (22:52 +0200)
We know that ptr is NULL, so no need to call free on it.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_support_filter_uu.c

index acb8feb79b2d68688a6391469c280c62d5ece54e..463e7e8f7213b61bd1ab5b8aaa680a09c097fcd3 100644 (file)
@@ -423,7 +423,6 @@ ensure_in_buff_size(struct archive_read_filter *self,
                /* Allocate the new buffer. */
                ptr = malloc(newsize);
                if (ptr == NULL) {
-                       free(ptr);
                        archive_set_error(&self->archive->archive,
                            ENOMEM,
                            "Can't allocate data for uudecode");