From eba92a95f3c75607b1eb478b8424675da87f2f4e Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sat, 29 Jan 2011 17:31:55 +0000 Subject: [PATCH] Use eina_stringshare_add() instead of strdup() on mmaped file names on Windows. This fix eet shut down on Windows. SVN revision: 56380 --- legacy/eet/ChangeLog | 6 +++++- legacy/eet/src/lib/eet_dictionary.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/eet/ChangeLog b/legacy/eet/ChangeLog index dbe3f0425c..6594360d4c 100644 --- a/legacy/eet/ChangeLog +++ b/legacy/eet/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/legacy/eet/src/lib/eet_dictionary.c b/legacy/eet/src/lib/eet_dictionary.c index 566f1484df..0e167aecb7 100644 --- a/legacy/eet/src/lib/eet_dictionary.c +++ b/legacy/eet/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 */