princeamd pushed a commit to branch enlightenment-0.17.

commit 1482c7e7e87fc7a1da09130b8842436d58528a87
Author: Chris Michael <[email protected]>
Date:   Thu Jun 27 10:57:22 2013 +0100

    Backport: b4f277a :: When we free outputs, set the variable to NULL.
    
    Signed-off-by: Chris Michael <[email protected]>
    Signed-off-by: Deon Thomas <[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

Reply via email to