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

@@ -237,7 +237,7 @@ form_create(xmpp_stanza_t* const form_stanza)
// handle options
} else if (g_strcmp0(child_name, "option") == 0) {
FormOption* option = malloc(sizeof(FormOption));
FormOption* option = g_new0(FormOption, 1);
option->label = _get_attr(field_child, "label");
option->value = _get_property(field_child, "value");