From 6c89380fea51686b775a93d9a68150262a20d513 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 23 Oct 2023 14:05:44 -0700 Subject: [PATCH] address null reference on AWS --- src/lambda.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda.zig b/src/lambda.zig index 3afeb4d..ebe9be4 100644 --- a/src/lambda.zig +++ b/src/lambda.zig @@ -71,7 +71,7 @@ pub fn run(allocator: ?std.mem.Allocator, event_handler: HandlerFn) !u8 { // TOD // Lambda does not have context, just environment variables. API Gateway // might be configured to pass in lots of context, but this comes through // event data, not context. - var response = UniversalLambdaResponse.init(allocator.?); + var response = UniversalLambdaResponse.init(req_allocator); response.output_file = std.io.getStdOut(); const event_response = event_handler(req_allocator, event.event_data, .{ .none = &response }) catch |err| { response.finish() catch unreachable;