]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
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
index d94558e156a4a4f91a3332bdca215b52017a6db0,3a166c7af26bf848ec4475370f64052aa0d0846f..facbc33fccaeaaf9829a4fcf72fd18a2e409f6d7
--- 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