two small memory leak fixes on failure paths
[xonotic/gmqcc.git] / ir.cpp
diff --git a/ir.cpp b/ir.cpp
index 7ac84773830e0a148b19b1eca21268192e1fac4b..3a166c7af26bf848ec4475370f64052aa0d0846f 100644 (file)
--- a/ir.cpp
+++ b/ir.cpp
@@ -1449,6 +1449,7 @@ ir_instr* ir_block_create_call(ir_block *self, lex_ctx_t ctx, const char *label,
         !ir_instr_op(in, 1, func, false))
     {
         delete in;
+        delete out;
         return nullptr;
     }
     vec_push(self->m_instr, in);