devilhorns pushed a commit to branch master.
commit ee715e24729163c6924df8336e70d91341751075
Author: Chris Michael <[email protected]>
Date: Wed May 29 13:05:43 2013 +0100
Fix possible memory leak reported by klockwork.
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index b1d7904..b2f264e 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -773,8 +773,10 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
/* get the outputs for this crtc */
outputs = ecore_x_randr_crtc_outputs_get(root, sd->crtc.id, &noutputs);
- if ((!outputs) || (noutputs < 1))
+ if (noutputs < 1)
{
+ free(outputs);
+
if ((outputs = malloc(sizeof(Ecore_X_Randr_Output))))
{
outputs[0] = sd->output;
--
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1