Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/umount one copy of the name is enough, and free it.
details: https://anonhg.NetBSD.org/src/rev/6c727e72113e
branches: trunk
changeset: 787730:6c727e72113e
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 29 23:06:29 2013 +0000
description:
one copy of the name is enough, and free it.
diffstat:
sbin/umount/umount.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r f78c0d09c7ac -r 6c727e72113e sbin/umount/umount.c
--- a/sbin/umount/umount.c Sat Jun 29 22:56:26 2013 +0000
+++ b/sbin/umount/umount.c Sat Jun 29 23:06:29 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umount.c,v 1.44 2013/06/29 22:53:04 christos Exp $ */
+/* $NetBSD: umount.c,v 1.45 2013/06/29 23:06:29 christos Exp $ */
/*-
* Copyright (c) 1980, 1989, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)umount.c 8.8 (Berkeley) 5/8/95";
#else
-__RCSID("$NetBSD: umount.c,v 1.44 2013/06/29 22:53:04 christos Exp $");
+__RCSID("$NetBSD: umount.c,v 1.45 2013/06/29 23:06:29 christos Exp $");
#endif
#endif /* not lint */
@@ -391,8 +391,8 @@
struct nfs_args nfsargs;
struct sockaddr_storage sa;
int proto;
+ char *name;
- char *name = strdup(mntpt);
memset(&sa, 0, sizeof(sa));
nfsargs.addr = (struct sockaddr *)&sa;
nfsargs.addrlen = sizeof(sa);
@@ -402,6 +402,7 @@
proto = IPPROTO_UDP;
else
proto = nfsargs.proto;
+ free(name);
// XXX: Return udp6/tcp6 too?
return proto == IPPROTO_UDP ? "udp" : "tcp";
Home |
Main Index |
Thread Index |
Old Index