forked from enlightenment/efl
elm_config: fix for dereferencing after comparing to NULL
Summary: arr has been checked earlier so as to avoid when it is NULL. If there is a possibility of being NULL earlier then it should be checked even when freeing. So added the NULL check before free. @fix Reviewers: singh.amitesh, bu5hm4n, tasn, cedric, raster, atulfokk, hyunseok, minkyu, Hermet, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4537
This commit is contained in:
parent
9bdaf07d6e
commit
b1f1cd14c2
|
@ -4191,8 +4191,11 @@ _elm_config_accel_preference_parse(const char *pref, Eina_Stringshare **accel,
|
|||
DBG("gl depth: %d", *gl_depth);
|
||||
DBG("gl stencil: %d", *gl_stencil);
|
||||
DBG("gl msaa: %d", *gl_msaa);
|
||||
if (arr)
|
||||
{
|
||||
free(arr[0]);
|
||||
free(arr);
|
||||
}
|
||||
|
||||
return is_hw_accel;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue