diff options
Diffstat (limited to 'lib/libarchive/archive_read_support_compression_program.c')
-rw-r--r-- | lib/libarchive/archive_read_support_compression_program.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libarchive/archive_read_support_compression_program.c b/lib/libarchive/archive_read_support_compression_program.c index d5cac14..05dbc32 100644 --- a/lib/libarchive/archive_read_support_compression_program.c +++ b/lib/libarchive/archive_read_support_compression_program.c @@ -109,12 +109,12 @@ archive_read_support_compression_program(struct archive *_a, const char *cmd) struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a); struct program_bidder *state; - state = (struct program_bidder *)calloc(sizeof (*state), 1); + if (bidder == NULL) + return (ARCHIVE_FATAL); + state = (struct program_bidder *)calloc(sizeof (*state), 1); if (state == NULL) return (ARCHIVE_FATAL); - if (bidder == NULL) - return (ARCHIVE_FATAL); state->cmd = strdup(cmd); state->bid = INT_MAX; |