Revert "Eina: Fix 58b194e0ad56fe83cce3946a5deb0045ee0cbce2"
authorCedric BAIL <cedric@osg.samsung.com>
Wed, 28 Oct 2015 05:38:14 +0000 (06:38 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 28 Oct 2015 05:38:14 +0000 (06:38 +0100)
This reverts commit 22b45f220c994f5b6e6ee2620ad8a5ab1e0528c2.

eina_file_cleanup always does an eina_tmpstr_del. This is now capable of doing
double or even triple free in some case.

src/lib/eina/eina_file_common.c

index 54510817a881057a1d7950b0b71f4b01668b54d7..4dee3c7b22fd15d93c66a426c2e3deb77f54cd3a 100644 (file)
@@ -359,7 +359,7 @@ eina_file_path_sanitize(const char *path)
    else
      result = path;
 
-   r = _eina_file_escape(eina_file_cleanup(result), len);
+   r = _eina_file_escape(strdup(result ? result : ""), len);
    if (result != path) eina_tmpstr_del(result);
 
    return r;