From: caro Date: Sat, 29 Jan 2011 17:31:55 +0000 (+0000) Subject: Use eina_stringshare_add() instead of strdup() on mmaped file X-Git-Tag: submit/2.0alpha-wayland/20121127.222001~213 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=648473ab1cd2c292c0897cbf105b86a020ecc68e;p=profile%2Fivi%2Feet.git Use eina_stringshare_add() instead of strdup() on mmaped file names on Windows. This fix eet shut down on Windows. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@56380 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index dbe3f04..6594360 100644 --- a/ChangeLog +++ b/ChangeLog @@ -480,5 +480,9 @@ 2011-01-29 Carsten Haitzler (The Rasterman) - 1.4.0 release + * 1.4.0 release +2011-01-29 Vincent Torri + + * Use eina_stringshare_add() instead of strdup() on mmaped file names + on Windows. This fix eet shut down on Windows. diff --git a/src/lib/eet_dictionary.c b/src/lib/eet_dictionary.c index 566f148..0e167ae 100644 --- a/src/lib/eet_dictionary.c +++ b/src/lib/eet_dictionary.c @@ -202,7 +202,7 @@ eet_dictionary_string_get_char(const Eet_Dictionary *ed, /* Windows file system could change the mmaped file when replacing a file. So we need to copy all string in memory to avoid bugs. */ if (!ed->all[idx].allocated) { - ed->all[idx].str = strdup(ed->all[idx].str); + ed->all[idx].str = eina_stringshare_add(ed->all[idx].str); ed->all[idx].allocated = EINA_TRUE; } #endif /* ifdef _WIN32 */