summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-09-18 00:49:34 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-09-18 00:49:34 +0000
commit033823e64e7e3b3ce2b69f0c2e39bc0707261976 (patch)
treeff61c2936778df72d6a3e5852610e3ac27752c17 /content
parente82c5be653d77de73a1d0e5eb7e83f4de193a6f7 (diff)
downloadnetsurf-033823e64e7e3b3ce2b69f0c2e39bc0707261976.tar.gz
netsurf-033823e64e7e3b3ce2b69f0c2e39bc0707261976.tar.bz2
Correctly create a sentinel and initialise user_list with it when cloning a content
svn path=/trunk/netsurf/; revision=12804
Diffstat (limited to 'content')
-rw-r--r--content/content.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index 7aea920a5..4a32fa040 100644
--- a/content/content.c
+++ b/content/content.c
@@ -1118,8 +1118,14 @@ struct content *content_clone(struct content *c)
*/
nserror content__clone(const struct content *c, struct content *nc)
{
+ struct content_user *user_sentinel;
nserror error;
+ user_sentinel = talloc_zero(c, struct content_user);
+ if (user_sentinel == NULL) {
+ return NSERROR_NOMEM;
+ }
+
error = llcache_handle_clone(c->llcache, &(nc->llcache));
if (error != NSERROR_OK) {
return error;
@@ -1165,6 +1171,8 @@ nserror content__clone(const struct content *c, struct content *nc)
}
nc->active = c->active;
+
+ nc->user_list = user_sentinel;
memcpy(&(nc->status_message), &(c->status_message), 120);
memcpy(&(nc->sub_status), &(c->sub_status), 80);