Fixed the fix for the memory leak
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 15:18:58 +0000 (15:18 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 15:18:58 +0000 (15:18 +0000)
[r13488]

ir/ana/execfreq.c

index eafdba8..d2b9d85 100644 (file)
@@ -367,15 +367,15 @@ compute_execfreq(ir_graph * irg, double loop_weight)
 #ifdef USE_GSL
                gsl_vector_free(x);
 #endif
-               free(matrix);
-               free(rhs);
-
                memset(&ef->hook, 0, sizeof(ef->hook));
                ef->hook.context = ef;
                ef->hook.hook._hook_node_info = exec_freq_node_info;
                register_hook(hook_node_info, &ef->hook);
        }
 
+       free(matrix);
+       free(rhs);
+
        return ef;
 }