Skip to content

Commit c02d603

Browse files
committed
fix memory leak for typelib backend
1 parent fa78c78 commit c02d603

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/backend/typelib.zig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ fn parseBase(allocator: Allocator, info: *libgi.BaseInfo) Allocator.Error!gi.Bas
243243
const name = getName(info);
244244
if (!std.ascii.isUpper(name[0])) {
245245
var callback = try parseCallback(allocator, cb);
246+
defer callback.deinit(allocator);
246247
var aw: Writer.Allocating = .init(allocator);
247248
errdefer aw.deinit();
248249
aw.writer.print("{f}", .{CallbackFormatter{ .callback = &callback }}) catch return error.OutOfMemory;

0 commit comments

Comments
 (0)