From 63bea5f70992cf4cdff703e69ac322d52a4341a6 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Oct 2023 09:27:52 +0000 Subject: [PATCH] CallArgs struct --- pydust/src/trampoline.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/pydust/src/trampoline.zig b/pydust/src/trampoline.zig index a5e11854..dc308988 100644 --- a/pydust/src/trampoline.zig +++ b/pydust/src/trampoline.zig @@ -287,6 +287,7 @@ pub fn Trampoline(comptime T: type) type { } const args = try py.allocator.alloc(py.PyObject, if (pyargs) |a| a.length() else 0); + defer py.allocator.free(args); if (pyargs) |a| { for (0..a.length()) |i| { args[i] = try a.getItem(py.PyObject, i);