Windows: Ensure core windows are fully initialised.

This commit is contained in:
Michael Drake 2017-06-11 10:12:50 +01:00
parent 98a73379fe
commit 38c10c85cb
4 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}