Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin Fix two more memory leaks found by Hubert Feyrer.
details: https://anonhg.NetBSD.org/src/rev/c7f14736465f
branches: trunk
changeset: 550773:c7f14736465f
user: jschauma <jschauma%NetBSD.org@localhost>
date: Thu Aug 21 04:30:25 2003 +0000
description:
Fix two more memory leaks found by Hubert Feyrer.
diffstat:
bin/chio/chio.c | 5 +++--
bin/ln/ln.c | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (53 lines):
diff -r 2a9f33524360 -r c7f14736465f bin/chio/chio.c
--- a/bin/chio/chio.c Thu Aug 21 02:12:33 2003 +0000
+++ b/bin/chio/chio.c Thu Aug 21 04:30:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chio.c,v 1.20 2003/08/04 22:31:21 jschauma Exp $ */
+/* $NetBSD: chio.c,v 1.21 2003/08/21 04:30:25 jschauma Exp $ */
/*-
* Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1996, 1998, 1999\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: chio.c,v 1.20 2003/08/04 22:31:21 jschauma Exp $");
+__RCSID("$NetBSD: chio.c,v 1.21 2003/08/21 04:30:25 jschauma Exp $");
#endif
#include <sys/param.h>
@@ -710,6 +710,7 @@
free(ces);
}
+ free(cn);
return (0);
}
diff -r 2a9f33524360 -r c7f14736465f bin/ln/ln.c
--- a/bin/ln/ln.c Thu Aug 21 02:12:33 2003 +0000
+++ b/bin/ln/ln.c Thu Aug 21 04:30:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ln.c,v 1.24 2003/08/13 03:21:08 itojun Exp $ */
+/* $NetBSD: ln.c,v 1.25 2003/08/21 04:30:25 jschauma Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94";
#else
-__RCSID("$NetBSD: ln.c,v 1.24 2003/08/13 03:21:08 itojun Exp $");
+__RCSID("$NetBSD: ln.c,v 1.25 2003/08/21 04:30:25 jschauma Exp $");
#endif
#endif /* not lint */
@@ -188,6 +188,8 @@
if ((fflag && unlink(source) < 0 && errno != ENOENT) ||
(*linkf)(target, source)) {
warn("%s", source);
+ free(sn);
+ free(tn);
return (1);
}
if (vflag)
Home |
Main Index |
Thread Index |
Old Index