Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/usr.bin/grep Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/d309552a2196
branches: netbsd-6
changeset: 775648:d309552a2196
user: riz <riz%NetBSD.org@localhost>
date: Fri Feb 08 20:49:21 2013 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #795):
usr.bin/grep/util.c: revision 1.17
Fix memory leak in file_matching().
diffstat:
usr.bin/grep/util.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 68885ad4996a -r d309552a2196 usr.bin/grep/util.c
--- a/usr.bin/grep/util.c Fri Feb 08 20:48:12 2013 +0000
+++ b/usr.bin/grep/util.c Fri Feb 08 20:49:21 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.13 2011/04/18 23:22:42 joerg Exp $ */
+/* $NetBSD: util.c,v 1.13.6.1 2013/02/08 20:49:21 riz Exp $ */
/* $FreeBSD: head/usr.bin/grep/util.c 211496 2010-08-19 09:28:59Z des $ */
/* $OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $ */
@@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: util.c,v 1.13 2011/04/18 23:22:42 joerg Exp $");
+__RCSID("$NetBSD: util.c,v 1.13.6.1 2013/02/08 20:49:21 riz Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -74,9 +74,10 @@
for (i = 0; i < fpatterns; ++i) {
if (fnmatch(fpattern[i].pat, fname, 0) == 0 ||
fnmatch(fpattern[i].pat, fname_base, 0) == 0) {
- if (fpattern[i].mode == EXCL_PAT)
+ if (fpattern[i].mode == EXCL_PAT) {
+ free(fname_copy);
return (false);
- else
+ } else
ret = true;
}
}
Home |
Main Index |
Thread Index |
Old Index