evas_gl: fix memory leak in case that version doesn't include dot
authorJihoon Kim <jihoon48.kim@samsung.com>
Sun, 23 Mar 2014 04:36:00 +0000 (13:36 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sun, 23 Mar 2014 04:36:00 +0000 (13:36 +0900)
fix CID 1193479

src/modules/evas/engines/gl_common/evas_gl_context.c

index a699932..f34bd88 100644 (file)
@@ -372,7 +372,11 @@ _evas_gl_common_version_check()
      return 0;
 
    tmp = strchr(version, '.');
-   if (!tmp) return 0;
+   if (!tmp)
+     {
+        free(version);
+        return 0;
+     }
    /* the first '.' always exists */
    *tmp = '\0';
    major = atoi(version);