fix an invalid free having to do with bound functions

this should fix the drone CI failure
master
Andrew Kelley 2020-03-25 21:00:02 -04:00
parent fae6cf0961
commit 5ec6a0ea02
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 3 additions and 0 deletions

View File

@ -13028,6 +13028,9 @@ static IrInstGen *ir_const_fn(IrAnalyze *ira, IrInst *source_instr, ZigFn *fn_en
static IrInstGen *ir_const_bound_fn(IrAnalyze *ira, IrInst *src_inst, ZigFn *fn_entry, IrInstGen *first_arg,
IrInst *first_arg_src)
{
// This is unfortunately required to avoid improperly freeing first_arg_src
ira_ref(ira);
IrInstGen *result = ir_const(ira, src_inst, get_bound_fn_type(ira->codegen, fn_entry));
result->value->data.x_bound_fn.fn = fn_entry;
result->value->data.x_bound_fn.first_arg = first_arg;