summaryrefslogtreecommitdiff
path: root/render/imagemap.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-05 11:13:08 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-05 11:13:08 +0100
commit8641d5cbda03acf1cf8333c3a94492182dc7bedd (patch)
treee625011e19293644871ff90054d2caf4e9a336b3 /render/imagemap.c
parentb646592928e518afcdc864fa22bcd3571f93af61 (diff)
downloadnetsurf-8641d5cbda03acf1cf8333c3a94492182dc7bedd.tar.gz
netsurf-8641d5cbda03acf1cf8333c3a94492182dc7bedd.tar.bz2
Fix a potential leak.
Diffstat (limited to 'render/imagemap.c')
-rw-r--r--render/imagemap.c3
1 files changed, 1 insertions, 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;