Fix double free

This commit is contained in:
jaina heartles 2022-11-17 20:11:23 -08:00
parent f33b4a856f
commit 0e034a2064

View file

@ -103,7 +103,8 @@ pub const Fields = struct {
errdefer self.allocator.free(val_clone);
if (try self.unmanaged.fetchPut(self.allocator, key_clone, val_clone)) |entry| {
self.allocator.free(entry.key);
self.allocator.free(key_clone);
//self.allocator.free(entry.key);
self.allocator.free(entry.value);
}
}
@ -123,8 +124,8 @@ pub const Fields = struct {
}
pub const CookieOptions = struct {
Secure: bool = false,
HttpOnly: bool = false,
Secure: bool = true,
HttpOnly: bool = true,
SameSite: ?enum {
Strict,
Lax,