forked from enlightenment/efl
evas_gl: fix memory leak in case that version doesn't include dot
fix CID 1193479
This commit is contained in:
parent
461555e4cc
commit
014183a1b7
|
@ -372,7 +372,11 @@ _evas_gl_common_version_check()
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
tmp = strchr(version, '.');
|
tmp = strchr(version, '.');
|
||||||
if (!tmp) return 0;
|
if (!tmp)
|
||||||
|
{
|
||||||
|
free(version);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/* the first '.' always exists */
|
/* the first '.' always exists */
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
major = atoi(version);
|
major = atoi(version);
|
||||||
|
|
Loading…
Reference in New Issue