summaryrefslogtreecommitdiff
path: root/cygwin
diff options
context:
space:
mode:
Diffstat (limited to 'cygwin')
-rw-r--r--cygwin/cygwin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index 58a86c9068..afdb27b315 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -337,6 +337,9 @@ XS(XS_Cygwin_win_to_posix_path)
posix_path = (char *) safemalloc(wlen+1);
wcsrtombs(posix_path, (const wchar_t **)&wbuf, wlen, NULL);
*/
+
+ safefree(wpath);
+ safefree(wbuf);
} else {
int what = absolute_flag ? CCP_WIN_A_TO_POSIX : CCP_WIN_A_TO_POSIX | CCP_RELATIVE;
posix_path = (char *) safemalloc (len + PATH_LEN_GUESS);
@@ -425,6 +428,9 @@ XS(XS_Cygwin_posix_to_win_path)
else setlocale(LC_CTYPE, "C");
SETLOCALE_UNLOCK;
+
+ safefree(wpath);
+ safefree(wbuf);
} else {
int what = absolute_flag ? CCP_POSIX_TO_WIN_A : CCP_POSIX_TO_WIN_A | CCP_RELATIVE;
win_path = (char *) safemalloc(len + PATH_LEN_GUESS);