From 0c954f40788eab758a0aff5583353a4fadf3ac22 Mon Sep 17 00:00:00 2001 From: Syam Sidhardhan Date: Wed, 23 May 2012 21:27:22 +0530 Subject: [PATCH] storage: Use g_free() instead of free() It is important to match g_*() memory allocation with g_free() --- src/storage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage.c b/src/storage.c index 973d54553..a91ee2dd3 100644 --- a/src/storage.c +++ b/src/storage.c @@ -732,7 +732,7 @@ int write_trust(const char *src, const char *addr, const char *service, else { char *new_str = service_list_to_string(services); ret = textfile_caseput(filename, addr, new_str); - free(new_str); + g_free(new_str); } g_slist_free(services); @@ -817,7 +817,7 @@ int store_record(const gchar *src, const gchar *dst, sdp_record_t *rec) err = textfile_put(filename, key, str); free(buf.data); - free(str); + g_free(str); return err; } @@ -839,7 +839,7 @@ sdp_record_t *record_from_string(const gchar *str) } rec = sdp_extract_pdu(pdata, size, &len); - free(pdata); + g_free(pdata); return rec; } -- 2.47.3