storage: Trivial change to free pathname in common part of the code
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 31 Oct 2011 13:31:35 +0000 (15:31 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 7 Nov 2011 16:40:07 +0000 (17:40 +0100)
src/storage.c

index 8b0db77..0854ed4 100644 (file)
@@ -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)