Skip to content

Commit

Permalink
Fix resource leak.
Browse files Browse the repository at this point in the history
Coverity CID 1635798.
  • Loading branch information
0-wiz-0 committed Dec 2, 2024
1 parent c4ec8eb commit 9ce1c23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/zip_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,13 @@ static int add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t

/* as long as we don't support non-seekable output, clear data descriptor bit */
if ((is_zip64 = _zip_dirent_write(za, de, flags)) < 0) {
zip_source_free(src_final);
return -1;
}

if ((offdata = zip_source_tell_write(za->src)) < 0) {
zip_error_set_from_source(&za->error, za->src);
zip_source_free(src_final);
return -1;
}

Expand Down

0 comments on commit 9ce1c23

Please sign in to comment.