Merge pull request #180 from xonotic/mem_leak_fix_on_failure_paths
authorDale Weiler <graphitemaster@users.noreply.github.com>
Sun, 26 Nov 2017 22:30:30 +0000 (17:30 -0500)
committerGitHub <noreply@github.com>
Sun, 26 Nov 2017 22:30:30 +0000 (17:30 -0500)
two small memory leak fixes on failure paths

1  2 
ir.cpp
parser.cpp

diff --cc ir.cpp
--- 1/ir.cpp
--- 2/ir.cpp
+++ b/ir.cpp
@@@ -1474,9 -1449,10 +1474,10 @@@ ir_instr* ir_block_create_call(ir_bloc
          !ir_instr_op(in, 1, func, false))
      {
          delete in;
+         delete out;
          return nullptr;
      }
 -    vec_push(self->m_instr, in);
 +    self->m_instr.push_back(in);
      /*
      if (noreturn) {
          if (!ir_block_create_return(self, ctx, nullptr)) {
diff --cc parser.cpp
Simple merge