summaryrefslogtreecommitdiff
path: root/src/storage.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2011-10-31 15:31:35 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-07 17:40:07 +0100
commit0f87b4e6267cef63e06dce2961b31dff595606e0 (patch)
tree3eaa9c0acc7e26880406925d95e4c72686c98a75 /src/storage.c
parent895c96e1e9d71b0a59812e76ca5d1c305fb38be5 (diff)
downloadconnman-0f87b4e6267cef63e06dce2961b31dff595606e0.tar.gz
connman-0f87b4e6267cef63e06dce2961b31dff595606e0.tar.bz2
connman-0f87b4e6267cef63e06dce2961b31dff595606e0.zip
storage: Trivial change to free pathname in common part of the code
Diffstat (limited to 'src/storage.c')
-rw-r--r--src/storage.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/storage.c b/src/storage.c
index 8b0db77b..0854ed4b 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)