diff mbox series

[12/22] phonebook: Replace g_strndup use with l_strndup

Message ID 20240226033724.1460079-12-denkenz@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series [01/22] gprs: Remove g_strfreev and g_strdupv use | expand

Commit Message

Denis Kenzior Feb. 26, 2024, 3:36 a.m. UTC
---
 src/phonebook.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/phonebook.c b/src/phonebook.c
index 122ba83c066e..eb48980e7a3b 100644
--- a/src/phonebook.c
+++ b/src/phonebook.c
@@ -267,7 +267,7 @@  static void print_merged_entry(gpointer pointer, gpointer user_data)
 static void destroy_merged_entry(gpointer pointer)
 {
 	struct phonebook_person *person = pointer;
-	g_free(person->text);
+	l_free(person->text);
 	g_free(person->group);
 	g_free(person->email);
 	g_free(person->sip_uri);
@@ -386,7 +386,7 @@  void ofono_phonebook_entry(struct ofono_phonebook *phonebook, int index,
 			person = g_new0(struct phonebook_person, 1);
 			phonebook->merge_list =
 				g_slist_prepend(phonebook->merge_list, person);
-			person->text = g_strndup(text, len_text);
+			person->text = l_strndup(text, len_text);
 		}
 
 		merge_field_number(&(person->number_list), number, type,