Backport: b4f277a :: When we free outputs, set the variable to NULL.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
This commit is contained in:
Chris Michael 2013-06-27 10:57:22 +01:00 committed by Deon Thomas
parent a3990e5108
commit 1482c7e7e8
1 changed files with 4 additions and 2 deletions

View File

@ -811,7 +811,8 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
{
mode = 0;
noutputs = 0;
free(outputs);
if (outputs) free(outputs);
outputs = NULL;
}
cx = sd->current.x;
@ -846,7 +847,8 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
}
/* free any allocated memory from ecore_x_randr */
free(outputs);
if (outputs) free(outputs);
outputs = NULL;
/* update crtc values to match current values */
sd->crtc.x = cx;