efl - ecore-x randr - fix coverity issue found after previous leak fix

fix coverity issue pointed out in the previous commit fix:

dadc1451e7

use after free of ptr (free was in wrong spot)

@fix
This commit is contained in:
Carsten Haitzler 2015-12-09 14:21:10 +09:00
parent 31984449a5
commit 7d57dfbe9c
1 changed files with 2 additions and 1 deletions

View File

@ -2669,13 +2669,14 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_
if ((!prop) || (items == 0))
{
free(prop);
/* check legacy backlight property
*
* FIXME: NB: Not sure what randr version we need for the legacy
* backlight property so skip version check */
if ((backlight = XInternAtom(_ecore_x_disp, "BACKLIGHT", True)))
{
free(prop);
prop = NULL;
XRRGetOutputProperty(_ecore_x_disp, output, backlight, 0, 4,
False, False, None, &type, &format,
&items, &bytes, &prop);