evas_gl: fix memory leak in case that version doesn't include dot

fix CID 1193479
This commit is contained in:
Jihoon Kim 2014-03-23 13:36:00 +09:00
parent 461555e4cc
commit 014183a1b7
1 changed files with 5 additions and 1 deletions

View 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);