summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-11-17 23:22:34 +0000
committerjoerg <joerg@FreeBSD.org>1995-11-17 23:22:34 +0000
commitef36b9955894e321e23b12f4d0889153774c9e3c (patch)
treef1ddb0e510f064a2fd33552b1aa1deb4ed68f11e /sbin
parentc5cc6e0eab5ebd42de4e093a284bb034e07e43de (diff)
downloadFreeBSD-src-ef36b9955894e321e23b12f4d0889153774c9e3c.zip
FreeBSD-src-ef36b9955894e321e23b12f4d0889153774c9e3c.tar.gz
Avoid bogus free() of a junk pointer.
Detected by: phkmalloc Submitted by: grog@lemis.de (Greg Lehey)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mountd/mountd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index 0887c59..f1e2e1f 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "From: @(#)mountd.c 8.8 (Berkeley) 2/20/94";*/
static const char rcsid[] =
- "$Id: mountd.c,v 1.8 1995/06/11 19:30:46 rgrimes Exp $";
+ "$Id: mountd.c,v 1.9 1995/06/27 11:06:19 dfr Exp $";
#endif /*not lint*/
#include <sys/param.h>
@@ -885,7 +885,7 @@ get_exportlist()
hpe = (struct hostent *)malloc(sizeof(struct hostent));
if (hpe == (struct hostent *)NULL)
out_of_mem();
- hpe->h_name = "Default";
+ hpe->h_name = strdup("Default");
hpe->h_addrtype = AF_INET;
hpe->h_length = sizeof (u_long);
hpe->h_addr_list = (char **)NULL;
OpenPOWER on IntegriCloud