summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-20 09:43:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-20 09:43:15 +0000
commit760878b4242ae20a7b10f7a8f49d3875e0201aad (patch)
tree8510da313d4481225d854afdd0e949148e3815f6 /file.c
parentfaac53f7baec4a2919bb941c0b7c0fcb62985381 (diff)
* eval.c (is_defined): should check receiver only once.
* eval.c (is_defined): should handle NODE_NEWLINE. * file.c (rb_file_s_expand_path): memory leak fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index 5a79c13..1735012 100644
--- a/file.c
+++ b/file.c
@@ -1469,6 +1469,7 @@ rb_file_s_expand_path(argc, argv)
tainted = 1;
BUFCHECK (strlen(dir) > buflen);
strcpy(buf, dir);
+ free(dir);
p = &buf[strlen(buf)];
}
while (p > buf && *(p - 1) == '/') p--;