summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorreggie@mdk10.(none) <>2005-03-15 16:24:37 -0600
committerreggie@mdk10.(none) <>2005-03-15 16:24:37 -0600
commit6c00af77a07194effdf5aa23196b4e47efb6e203 (patch)
tree585e3b65c3138f999f2d402e76e7f34f32a0bd1b /sql/sql_show.cc
parentef86c0af65390328ddfedf2566af8a8b5417f2ec (diff)
downloadmariadb-git-6c00af77a07194effdf5aa23196b4e47efb6e203.tar.gz
Bug #6660 mysqldump creates bad pathnames on Windows
sql_show.cc: changed strdup to thd->memdup per Serg's advice
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index a85a6f92d70..76ea72ef41c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1228,12 +1228,11 @@ static void append_directory(THD *thd, String *packet, const char *dir_type,
packet->append(dir_type);
packet->append(" DIRECTORY='", 12);
#ifdef __WIN__
- char *winfilename = strdup(filename);
+ char *winfilename = thd->memdup(filename, length);
for (uint i=0; i < length; i++)
if (winfilename[i] == '\\')
winfilename[i] = '/';
packet->append(winfilename, length);
- free(winfilename);
#else
packet->append(filename, length);
#endif