From 0285c2984fc1913d583432716d6fff4f9f291994 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 25 Apr 2003 08:03:15 +0000 Subject: [project @ 2003-04-25 08:03:15 by bursa] Various memory fixes. svn path=/import/netsurf/; revision=128 --- desktop/browser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'desktop/browser.c') diff --git a/desktop/browser.c b/desktop/browser.c index 32c9bc659..0a9c674ac 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1,5 +1,5 @@ /** - * $Id: browser.c,v 1.34 2003/04/15 17:53:00 bursa Exp $ + * $Id: browser.c,v 1.35 2003/04/25 08:03:15 bursa Exp $ */ #include "netsurf/content/cache.h" @@ -76,7 +76,9 @@ struct history* history_create(char* desc, char* url) { struct history* h = xcalloc(1, sizeof(struct history)); LOG(("desc = %s, url = %s", desc, url)); - h->description = xstrdup(desc); + h->description = 0; + if (desc != 0) + h->description = xstrdup(desc); h->url = xstrdup(url); LOG(("return h = %p", h)); return h; -- cgit v1.2.3