summaryrefslogtreecommitdiff
path: root/render/hubbub_binding.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-04-30 07:00:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-04-30 07:00:58 +0000
commit000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc (patch)
treea8afaa98c8beab93ea2d383fba9b01ed6821946e /render/hubbub_binding.c
parentb579b0deb39c067f19bebcb4acfb29d7ef87f258 (diff)
downloadnetsurf-000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc.tar.gz
netsurf-000e6ad3dea9fe04759c7d27ea9ae500eccdc4bc.tar.bz2
It turns out that realloc(ptr, 0) --> free(ptr) is not actually required by the C standard (whereas realloc(NULL, size) --> malloc(size) is).
Therefore, explicitly model the behaviour expected by our libraries (that realloc of 0 size is equivalent to free). svn path=/trunk/netsurf/; revision=10524
Diffstat (limited to 'render/hubbub_binding.c')
-rw-r--r--render/hubbub_binding.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render/hubbub_binding.c b/render/hubbub_binding.c
index fc0a31944..bc509b4eb 100644
--- a/render/hubbub_binding.c
+++ b/render/hubbub_binding.c
@@ -128,6 +128,7 @@ static hubbub_tree_handler tree_handler = {
static void *myrealloc(void *ptr, size_t len, void *pw)
{
+ /* talloc_realloc_size(pw, ptr, 0) == talloc_free(ptr) */
return talloc_realloc_size(pw, ptr, len);
}