From 9d418379bfd515a1707742b4d3d295e47846fc8f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 30 Jan 2013 18:08:59 +0900 Subject: [PATCH] Use the correct type when allocating flow node edges. sizeof (struct) vs sizeof (struct *). Ouch. --- tools/qfcc/source/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/flow.c b/tools/qfcc/source/flow.c index 4c4b62dce..4e5940fbd 100644 --- a/tools/qfcc/source/flow.c +++ b/tools/qfcc/source/flow.c @@ -983,7 +983,7 @@ flow_make_edges (flowgraph_t *graph) if (graph->edges); free (graph->edges); - graph->edges = malloc (graph->num_edges * sizeof (flowedge_t *)); + graph->edges = malloc (graph->num_edges * sizeof (flowedge_t)); for (j = 0, i = 0; i < graph->num_nodes + 2; i++) { node = graph->nodes[i]; for (succ = set_first (node->successors); succ;