pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/nawk As dholland pointed out, don't leak memory w...
details: https://anonhg.NetBSD.org/pkgsrc/rev/76801c6033dd
branches: trunk
changeset: 546304:76801c6033dd
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Aug 26 20:26:25 2008 +0000
description:
As dholland pointed out, don't leak memory when FS needs resizing more
than once. Bump revision again.
diffstat:
lang/nawk/Makefile | 4 ++--
lang/nawk/files/lib.c | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r aea8703f708c -r 76801c6033dd lang/nawk/Makefile
--- a/lang/nawk/Makefile Tue Aug 26 18:20:09 2008 +0000
+++ b/lang/nawk/Makefile Tue Aug 26 20:26:25 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.33 2008/08/26 14:46:21 joerg Exp $
+# $NetBSD: Makefile,v 1.34 2008/08/26 20:26:25 joerg Exp $
DISTNAME= nawk-20050424
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= # empty
DISTFILES= # empty
diff -r aea8703f708c -r 76801c6033dd lang/nawk/files/lib.c
--- a/lang/nawk/files/lib.c Tue Aug 26 18:20:09 2008 +0000
+++ b/lang/nawk/files/lib.c Tue Aug 26 20:26:25 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.c,v 1.2 2008/08/26 14:46:21 joerg Exp $ */
+/* $NetBSD: lib.c,v 1.3 2008/08/26 20:26:25 joerg Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
@@ -193,6 +193,8 @@
if ((len = strlen(*FS)) <= len_inputFS) {
strcpy(inputFS, *FS); /* for subsequent field splitting */
} else {
+ if (inputFS != static_inputFS)
+ free(inputFS);
inputFS = malloc(len + 1);
if (inputFS == NULL)
FATAL("field separator %.10s... is too long", *FS);
Home |
Main Index |
Thread Index |
Old Index