mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 05:56:21 +00:00
refactor: replace malloc with g_new0 in many occasions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user