Using calloc instead of malloc to initialize mCoreThread

This commit is contained in:
Sergiotarxz 2023-03-13 00:28:44 +01:00
parent 91e7ff6d66
commit 1198bbabbf

View File

@ -89,7 +89,7 @@ msCoreControllerDestroy(struct msCoreController **controller_ptr) {
}
struct msCoreController *
msCoreControllerNew (struct mCore *core, struct msClientConnectionData *const data) {
struct msCoreController *controller = malloc (sizeof *controller);
struct msCoreController *controller = calloc (sizeof *controller, 1);
controller->multiplayer = NULL;
controller->threadContext.core = core;
controller->threadContext.userData = data;