ryuan pushed a commit to branch master.
commit 7aac59a958f30a78636db42d04797d4fc1a85b6c
Author: Ryuan Choi <[email protected]>
Date: Tue Aug 6 20:08:16 2013 +0900
fileselector: Simple refactoring to fix possible leak.
This fixes "Resource leaks" which was spotted by coverity. CID 1054518
---
src/lib/elc_fileselector.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 983f1eb..6443c04 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -667,21 +667,21 @@ _on_item_selected(void *data,
if (!path)
return;
- sdata = malloc(sizeof(*sdata));
- sdata->fs = data;
- sdata->path = path;
-
if (sd->only_folder)
eina_stringshare_replace(&sd->path, path);
else
{
- dir = ecore_file_dir_get(sdata->path);
+ dir = ecore_file_dir_get(path);
if (!dir) return;
eina_stringshare_replace(&sd->path, dir);
free(dir);
}
+ sdata = malloc(sizeof(*sdata));
+ sdata->fs = data;
+ sdata->path = path;
+
if (sd->sel_idler)
{
old_sd = ecore_idler_del(sd->sel_idler);
--
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk