summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-06-11 09:12:50 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2017-06-11 09:12:50 (GMT)
commit38c10c85cbfbc47eaaf64a58fb50d60e136af673 (patch)
tree7bf536ce1e0142396f80ce208e74b93da67f0653
parent98a73379fec8297c840f592db8c9d2b6aed257bc (diff)
downloadnetsurf-38c10c85cbfbc47eaaf64a58fb50d60e136af673.tar.gz
netsurf-38c10c85cbfbc47eaaf64a58fb50d60e136af673.tar.bz2
Windows: Ensure core windows are fully initialised.
-rw-r--r--frontends/windows/cookies.c2
-rw-r--r--frontends/windows/global_history.c2
-rw-r--r--frontends/windows/hotlist.c2
-rw-r--r--frontends/windows/local_history.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index c4880fa..b3c56da 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -136,7 +136,7 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_cookie_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/global_history.c b/frontends/windows/global_history.c
index 0ba013b..dcc75ba 100644
--- a/frontends/windows/global_history.c
+++ b/frontends/windows/global_history.c
@@ -126,7 +126,7 @@ static nserror nsw32_global_history_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_global_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/hotlist.c b/frontends/windows/hotlist.c
index 0efe76f..e8dd90b 100644
--- a/frontends/windows/hotlist.c
+++ b/frontends/windows/hotlist.c
@@ -130,7 +130,7 @@ static nserror nsw32_hotlist_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_hotlist_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/local_history.c b/frontends/windows/local_history.c
index 205ebfe..722d365 100644
--- a/frontends/windows/local_history.c
+++ b/frontends/windows/local_history.c
@@ -143,7 +143,7 @@ nsw32_local_history_init(HINSTANCE hInstance,
return res;
}
- ncwin = malloc(sizeof(struct nsw32_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}