intel: fix disasm_info memory leaks
authorTapani Pälli <tapani.palli@intel.com>
Mon, 20 Nov 2017 08:57:17 +0000 (10:57 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 21 Nov 2017 06:36:43 +0000 (08:36 +0200)
Fixes: 4f82b1728719 ("i965: Rewrite disassembly annotation code")
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_fs_generator.cpp
src/intel/compiler/brw_vec4_generator.cpp

index 4984fb83d6355843d79674c907ba70bbc16e5eab..28790c86a64179b3e082069abab531fe9367723c 100644 (file)
@@ -2215,8 +2215,8 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
               100.0f * (before_size - after_size) / before_size);
 
       dump_assembly(p->store, disasm_info);
-      ralloc_free(disasm_info);
    }
+   ralloc_free(disasm_info);
    assert(validated);
 
    compiler->shader_debug_log(log_data,
index 05671904734d758be3f577da01d39653bc60eb1d..8e11754e021975362dd524b4c0f3c44f62109344 100644 (file)
@@ -2203,8 +2203,8 @@ generate_code(struct brw_codegen *p,
               100.0f * (before_size - after_size) / before_size);
 
       dump_assembly(p->store, disasm_info);
-      ralloc_free(disasm_info);
    }
+   ralloc_free(disasm_info);
    assert(validated);
 
    compiler->shader_debug_log(log_data,