diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-07-22 16:16:41 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-07-22 16:16:41 +0000 |
commit | 275e8705031e539ec9999f68482039d1bcfb1608 (patch) | |
tree | 3adcf4102a62a22872695a978f67609cf6bfae85 /ext/Cwd/Cwd.xs | |
parent | 6d3b25aa06c9837fbb97c3791369b6d8990787c7 (diff) | |
download | perl-275e8705031e539ec9999f68482039d1bcfb1608.tar.gz |
Upgrade to Cwd 2.20
p4raw-id: //depot/perl@23152
Diffstat (limited to 'ext/Cwd/Cwd.xs')
-rw-r--r-- | ext/Cwd/Cwd.xs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs index fae3ef97e3..273ab2d121 100644 --- a/ext/Cwd/Cwd.xs +++ b/ext/Cwd/Cwd.xs @@ -424,10 +424,10 @@ PPCODE: else croak("Usage: getdcwd(DRIVE)"); - /* Pass a NULL pointer as the second argument to have space allocated. */ - if (dir = _getdcwd(drive, NULL, MAXPATHLEN)) { + New(0,dir,MAXPATHLEN,char); + if (_getdcwd(drive, dir, MAXPATHLEN)) { sv_setpvn(TARG, dir, strlen(dir)); - free(dir); + Safefree(dir); SvPOK_only(TARG); } else |