summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-12 08:48:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-12 08:48:57 +0000
commit29adeb4c1a67ea30cd2f228324fa6d8de39e8e24 (patch)
treecfed014df61f4bc4fc6fd0fa39d0896ac49a0505
parent4aa31856a752dcf816f39652604dd4b8c259584a (diff)
downloadruby-29adeb4c1a67ea30cd2f228324fa6d8de39e8e24.tar.gz
ruby-29adeb4c1a67ea30cd2f228324fa6d8de39e8e24.tar.xz
ruby-29adeb4c1a67ea30cd2f228324fa6d8de39e8e24.zip
* dir.c (glob_helper): fixed freeing buffer. (ruby-bugs-ja:PR#332)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--dir.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 77153b1ea..3ebd2bf88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 17:45:15 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+
+ * dir.c (glob_helper): fixed freeing buffer. (ruby-bugs-ja:PR#332)
+
Thu Sep 12 00:09:32 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (rb_trap_eval): preserve thread status and so on.
diff --git a/dir.c b/dir.c
index 72ce949b2..72f5fd3cd 100644
--- a/dir.c
+++ b/dir.c
@@ -787,6 +787,7 @@ glob_helper(path, sub, flags, func, arg)
status = glob_helper(buf, t, flags, func, arg);
free(buf);
if (status) goto finalize;
+ continue;
}
free(buf);
continue;
@@ -796,6 +797,7 @@ glob_helper(path, sub, flags, func, arg)
sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
if (!m) {
status = glob_call_func(func, path, arg);
+ free(buf);
if (status) goto finalize;
continue;
}