From 0f87b4e6267cef63e06dce2961b31dff595606e0 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Mon, 31 Oct 2011 15:31:35 +0200 Subject: [PATCH] storage: Trivial change to free pathname in common part of the code --- src/storage.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/storage.c b/src/storage.c index 8b0db77..0854ed4 100644 --- a/src/storage.c +++ b/src/storage.c @@ -248,12 +248,9 @@ GKeyFile *connman_storage_load_service(const char *service_id) return NULL; keyfile = storage_load(pathname); - if (keyfile) { - g_free(pathname); - return keyfile; - } - g_free(pathname); + if (keyfile) + return keyfile; pathname = g_strdup_printf("%s/%s", STORAGEDIR, DEFAULT); if(pathname == NULL) -- 2.7.4