From 563885cad6b8b6e3485a676c06d53acec1e93afc Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 12 Sep 2002 08:48:57 +0000 Subject: * dir.c (glob_helper): fixed freeing buffer. (ruby-bugs-ja:PR#332) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 72ce949b24..72f5fd3cd1 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; } -- cgit v1.2.3