Skip to content

Commit

Permalink
fix: mem leak config error
Browse files Browse the repository at this point in the history
  • Loading branch information
freref committed Feb 24, 2025
1 parent 7e634cf commit 89c9e83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Context.zig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub const Context = struct {
null;

const config = try allocator.create(Config);
errdefer allocator.destroy(config);
config.* = try Config.init(allocator);

var pdf_handler = try PdfHandler.init(allocator, path, initial_page, config);
Expand Down

0 comments on commit 89c9e83

Please sign in to comment.