summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-06-11 09:05:59 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2017-06-11 09:05:59 (GMT)
commitdfa1e0bcd3e48f85214ff2b01909b00454d44d82 (patch)
treec391f48f2fc14bbea691784a5e8896b9ecd015f3
parentd34b0726e38b0ad51bf1b733fd611df0409b5001 (diff)
downloadnetsurf-dfa1e0bcd3e48f85214ff2b01909b00454d44d82.tar.gz
netsurf-dfa1e0bcd3e48f85214ff2b01909b00454d44d82.tar.bz2
GTK: Ensure core windows are fully initialised.
-rw-r--r--frontends/gtk/cookies.c2
-rw-r--r--frontends/gtk/global_history.c2
-rw-r--r--frontends/gtk/hotlist.c2
-rw-r--r--frontends/gtk/local_history.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index dc77e1c..500cd07 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -246,7 +246,7 @@ static nserror nsgtk_cookies_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_cookie_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/global_history.c b/frontends/gtk/global_history.c
index 66ba1a6..360eb4e 100644
--- a/frontends/gtk/global_history.c
+++ b/frontends/gtk/global_history.c
@@ -299,7 +299,7 @@ static nserror nsgtk_global_history_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_global_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 34a1377..936573a 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -319,7 +319,7 @@ static nserror nsgtk_hotlist_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_hotlist_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/local_history.c b/frontends/gtk/local_history.c
index b36ccd2..cc95801 100644
--- a/frontends/gtk/local_history.c
+++ b/frontends/gtk/local_history.c
@@ -141,7 +141,7 @@ nsgtk_local_history_init(struct browser_window *bw,
return res;
}
- ncwin = malloc(sizeof(struct nsgtk_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}