diff options
author | Chris Michael <cp.michael@samsung.com> | 2013-05-29 13:05:43 +0100 |
---|---|---|
committer | Deon Thomas <PrinceAMD.Elive@gmail.com> | 2013-06-28 03:28:53 -0400 |
commit | e2dc213609913484d9ea507419ba219ccb49e1de (patch) | |
tree | b50f74ef388a77f52e7e43d5b81c349c34ceb0be | |
parent | c45ebc84c9c2f556526ddae1267fda430dfa2fa4 (diff) | |
download | enlightenment-e2dc213609913484d9ea507419ba219ccb49e1de.tar.gz |
Backport: ee715e2 :: Fix possible memory leak reported by klockwork.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
-rw-r--r-- | src/modules/conf_randr/e_smart_monitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index b1d7904fc6..b2f264ea41 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; |