g_free() to auto_gfree, introduce auto_guchar

Fix 11 potential mem leaks in theme.c
This commit is contained in:
John Hernandez
2023-07-13 17:04:59 +02:00
parent 3a4cd7da48
commit 8304ac86ff
39 changed files with 145 additions and 233 deletions

View File

@@ -163,9 +163,8 @@ roster_get_contact(const char* const barejid)
{
assert(roster != NULL);
gchar* barejidlower = g_utf8_strdown(barejid, -1);
auto_gchar gchar* barejidlower = g_utf8_strdown(barejid, -1);
PContact contact = g_hash_table_lookup(roster->contacts, barejidlower);
g_free(barejidlower);
return contact;
}