From: Enlightenment S. <no-...@en...> - 2008-11-04 15:54:48
|
Log: EFM: Make a copy of the dev argument, since eina_stringshare_del is called on ic->sd->dev inside e_fm2_path_set() before anything is done and, thus, pointer is no more valid. Author: ptomaine Date: 2008-11-04 07:54:38 -0800 (Tue, 04 Nov 2008) New Revision: 37457 Modified: trunk/e/src/bin/e_fm.c Modified: trunk/e/src/bin/e_fm.c =================================================================== --- trunk/e/src/bin/e_fm.c 2008-11-04 14:21:06 UTC (rev 37456) +++ trunk/e/src/bin/e_fm.c 2008-11-04 15:54:38 UTC (rev 37457) @@ -5163,9 +5163,12 @@ ) { char buf[4096]; + char *dev = eina_stringshare_add(ic->sd->dev); snprintf(buf, sizeof(buf), "%s/%s", ic->sd->path, ic->info.file); - e_fm2_path_set(ic->sd->obj, ic->sd->dev, buf); + e_fm2_path_set(ic->sd->obj, dev, buf); + + eina_stringshare_del(dev); } else evas_object_smart_callback_call(ic->sd->obj, "selected", NULL); @@ -5222,9 +5225,12 @@ ) { char buf[4096]; + char *dev = eina_stringshare_add(ic->sd->dev); snprintf(buf, sizeof(buf), "%s/%s", ic->sd->path, ic->info.file); - e_fm2_path_set(ic->sd->obj, ic->sd->dev, buf); + e_fm2_path_set(ic->sd->obj, dev, buf); + + eina_stringshare_del(dev); } else if ((S_ISDIR(ic->info.statinfo.st_mode)) && (ic->sd->config->view.single_click)) evas_object_smart_callback_call(ic->sd->obj, "selected", NULL); |