elm - fix data leak if config version bad in property.
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 7 Aug 2014 04:56:03 +0000 (13:56 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 7 Aug 2014 04:56:03 +0000 (13:56 +0900)
src/lib/elm_config.c

index c90d3ca269a5079450bfb5310f067434c55c6600..c7898db6b3997d8837e0d2429cc3dadc05748a7f 100644 (file)
@@ -207,7 +207,10 @@ _prop_config_get(void)
    /* Most obvious case, new version and we are still linked to
     * whatever was there before, we just ignore until user restarts us */
    if (config_data->config_version > ELM_CONFIG_VERSION)
-     return EINA_TRUE;
+     {
+        _config_free(config_data);
+        return EINA_TRUE;
+     }
    /* What in the case the version is older? Do we even support those
     * cases or we only check for equality above? */