refactor: replace malloc with g_new0 in many occasions

This commit is contained in:
Michael Vetter
2026-02-27 00:38:28 +01:00
parent de5949e8eb
commit 373ec4a7e3
19 changed files with 56 additions and 56 deletions

View File

@@ -13,7 +13,7 @@ connection_get_ctx(void)
static DataForm*
_new_form(void)
{
DataForm* form = malloc(sizeof(DataForm));
DataForm* form = g_new0(DataForm, 1);
form->type = NULL;
form->title = NULL;
form->instructions = NULL;
@@ -28,7 +28,7 @@ _new_form(void)
static FormField*
_new_field(void)
{
FormField* field = malloc(sizeof(FormField));
FormField* field = g_new0(FormField, 1);
field->label = NULL;
field->type = NULL;
field->description = NULL;