Enlightenment CVS committal
Author : shorne
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_ipc_handlers.h
Log Message:
Fix ipc memleak, found when testing -dirs-list
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -3 -r1.131 -r1.132
--- e_ipc_handlers.h 19 Jul 2006 13:44:32 -0000 1.131
+++ e_ipc_handlers.h 1 Aug 2006 04:54:12 -0000 1.132
@@ -1552,15 +1552,22 @@
E_Path_Dir *p;
if (s) {
- dat = evas_list_append(dat, strdup(s));
+ dat = evas_list_append(dat, evas_stringshare_add(s));
FOR(dir_list) { p = l->data;
- dat = evas_list_append(dat, p->dir);
+ dat = evas_list_append(dat, evas_stringshare_add(p->dir));
}
}
ENCODE(dat, e_ipc_codec_str_list_enc);
SEND_DATA(E_IPC_OP_DIRS_LIST_REPLY);
- evas_list_free(dat);
+ while (dat)
+ {
+ const char *dir;
+
+ dir = dat->data;
+ evas_stringshare_del(dir);
+ dat = evas_list_remove_list(dat, dat);
+ }
e_path_dir_list_free(dir_list);
END_STRING(s)
#elif (TYPE == E_REMOTE_IN)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs