From d29fcdbed327925a71e5d7f6c40eecd99e15ca44 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 26 Feb 2026 19:29:43 +0100 Subject: [PATCH] refactor: Use p_contact_new instead of malloc in p_contact_new() --- src/xmpp/contact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmpp/contact.c b/src/xmpp/contact.c index fd2889b9..e9225472 100644 --- a/src/xmpp/contact.c +++ b/src/xmpp/contact.c @@ -66,7 +66,7 @@ p_contact_new(const char* const barejid, const char* const name, GSList* groups, const char* const subscription, const char* const offline_message, gboolean pending_out) { - PContact contact = malloc(sizeof(struct p_contact_t)); + PContact contact = g_new0(struct p_contact_t, 1); contact->barejid = strdup(barejid); contact->barejid_collate_key = g_utf8_collate_key(contact->barejid, -1);