devilhorns pushed a commit to branch master.
commit b4f277a4a62d34e5ac4f5539d474d5c6f79af210
Author: Chris Michael <[email protected]>
Date: Thu Jun 27 10:57:22 2013 +0100
When we free outputs, set the variable to NULL.
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index 9cd7d2d..d1fbc15 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -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;
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev