From 8641d5cbda03acf1cf8333c3a94492182dc7bedd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 5 Sep 2013 11:13:08 +0100 Subject: Fix a potential leak. --- render/imagemap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/render/imagemap.c b/render/imagemap.c index e50ed6cb6..433ae68be 100644 --- a/render/imagemap.c +++ b/render/imagemap.c @@ -564,14 +564,13 @@ imagemap_addtolist(dom_node *n, nsurl *base_url, if (xcoords == NULL) { goto bad_out; } + new_map->bounds.poly.xcoords = xcoords; ycoords = realloc(new_map->bounds.poly.ycoords, num * sizeof(float)); if (ycoords == NULL) { goto bad_out; } - - new_map->bounds.poly.xcoords = xcoords; new_map->bounds.poly.ycoords = ycoords; new_map->bounds.poly.xcoords[num - 1] = x; -- cgit v1.2.3