[bun.js] Fix double free in Blob

This commit is contained in:
Jarred Sumner
2022-04-01 22:54:22 -07:00
parent 5c989c957a
commit fffb69ce61

View File

@@ -2874,7 +2874,9 @@ pub const Blob = struct {
/// and increment the reference count
pub fn dupe(this: *const Blob) Blob {
if (this.store != null) this.store.?.ref();
return this.*;
var duped = this.*;
duped.allocator = null;
return duped;
}
pub fn deinit(this: *Blob) void {