RISC OS: Ensure core windows are fully initialised.

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

View File

@ -377,7 +377,7 @@ static nserror ro_cookie_init(void)
return NSERROR_OK;
}
ncwin = malloc(sizeof(struct ro_cookie_window));
ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}

View File

@ -405,7 +405,7 @@ static nserror ro_global_history_init(void)
return NSERROR_OK;
}
ncwin = malloc(sizeof(struct ro_global_history_window));
ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}

View File

@ -466,7 +466,7 @@ static nserror ro_hotlist_init(void)
return NSERROR_OK;
}
ncwin = malloc(sizeof(struct ro_hotlist_window));
ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}

View File

@ -299,7 +299,7 @@ ro_local_history_init(struct browser_window *bw,
return res;
}
ncwin = malloc(sizeof(struct ro_local_history_window));
ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}