Fix use of uninitialized memory in edge-resistance.c

g_new bad, g_new0 good.
This commit is contained in:
Colin Walters 2009-08-06 09:39:00 -04:00
parent 8a9e2877da
commit 422cd1fbbf

View File

@ -844,7 +844,7 @@ cache_edges (MetaDisplay *display,
* 2nd: Allocate the edges
*/
g_assert (display->grab_edge_resistance_data == NULL);
display->grab_edge_resistance_data = g_new (MetaEdgeResistanceData, 1);
display->grab_edge_resistance_data = g_new0 (MetaEdgeResistanceData, 1);
edge_data = display->grab_edge_resistance_data;
edge_data->left_edges = g_array_sized_new (FALSE,
FALSE,