summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/gui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 287652d6e..10a2b329d 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -323,6 +323,11 @@ fb_browser_window_redraw(fbtk_widget_t *root, fbtk_widget_t *widget, void *pw)
static void *myrealloc(void *ptr, size_t len, void *pw)
{
+ if (len == 0) {
+ free(ptr);
+ return NULL;
+ }
+
return realloc(ptr, len);
}