elm: theme: avoid double free in theme version check
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 12 Dec 2016 15:35:44 +0000 (16:35 +0100)
committerStefan Schmidt <stefan@osg.samsung.com>
Mon, 12 Dec 2016 15:44:02 +0000 (16:44 +0100)
If we would have a version below 110 we would run into a double free here.
Just warn and let the freeing happen two lines below.

CID: 1366926

src/lib/elementary/elm_theme.c

index 9349fca29ab2b5c6e685f827dcdde1c5a136a2a1..75f241f48070becdd205eb4ee2c78fc7c991ad3e 100644 (file)
@@ -52,7 +52,6 @@ _elm_theme_item_finalize(Elm_Theme_Files *files,
         if (v < 110) // bump this version number when we need to
           {
              WRN("Selected theme is too old (version = %d, needs >= 110)", v);
-             free(version);
           }
         free(version);
      }