Skip to content

Commit

Permalink
Fix memory leak in error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Sep 30, 2023
1 parent 6f8ddb2 commit 479c7af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/zip_source_zip_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s
zip_encryption_implementation enc_impl;

if ((enc_impl = _zip_get_encryption_implementation(st.encryption_method, ZIP_CODEC_DECODE)) == NULL) {
zip_source_free(src);
zip_error_set(error, ZIP_ER_ENCRNOTSUPP, 0);
return NULL;
}
Expand Down

0 comments on commit 479c7af

Please sign in to comment.