Skip to content

Commit

Permalink
Cleaning up leak on error
Browse files Browse the repository at this point in the history
  • Loading branch information
colincornaby committed Jul 10, 2024
1 parent dcd06d9 commit 1e4cb16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ static la_ssize_t copy_data(struct archive* ar, struct archive* aw)

if ((r = archive_read_open_filename(a, file.GetFileName().c_str(), 10240)) != ARCHIVE_OK) {
// couldn't read
archive_read_free(a);
archive_write_close(ext);
archive_write_free(ext);
return;
}

Expand Down

0 comments on commit 1e4cb16

Please sign in to comment.