address null reference on AWS
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m32s

This commit is contained in:
Emil Lerch 2023-10-23 14:05:44 -07:00
parent 983a1a6649
commit 6c89380fea
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -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;