summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/cdrom.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
committerjkh <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
commit17cc23f57886f93c187a29f8994632dac71ebf7b (patch)
treeb4559797b88382d69ce7830e112c0f922eafa0ba /usr.sbin/sysinstall/cdrom.c
parente1e9e3aa19b00c35016cddf8a23e2b7fc0d9f4e0 (diff)
downloadFreeBSD-src-17cc23f57886f93c187a29f8994632dac71ebf7b.zip
FreeBSD-src-17cc23f57886f93c187a29f8994632dac71ebf7b.tar.gz
Be more efficient in how we use memory (stumbled across while looking for
something else) for attributes and variables. Remove stack-stomper in sstrncpy().
Diffstat (limited to 'usr.sbin/sysinstall/cdrom.c')
-rw-r--r--usr.sbin/sysinstall/cdrom.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/cdrom.c b/usr.sbin/sysinstall/cdrom.c
index beb22db..8324e65 100644
--- a/usr.sbin/sysinstall/cdrom.c
+++ b/usr.sbin/sysinstall/cdrom.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: cdrom.c,v 1.26 1996/10/14 21:32:22 jkh Exp $
+ * $Id: cdrom.c,v 1.27 1996/12/11 09:34:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -74,7 +74,7 @@ mediaInitCDROM(Device *dev)
args.fspec = dev->devname;
args.flags = 0;
- cd_attr = alloca(sizeof(Attribs) * MAX_ATTRIBS);
+ cd_attr = safe_malloc(sizeof(Attribs) * MAX_ATTRIBS);
cp = NULL;
dontRead = FALSE;
/* If this cdrom's not already mounted or can't be mounted, yell */
@@ -116,6 +116,7 @@ mediaInitCDROM(Device *dev)
"to set the boot floppy version string to match that of the CD\n"
"before selecting it as an installation media to avoid this warning", cp, variable_get(VAR_RELNAME));
}
+ attr_free(cd_attr);
msgDebug("Mounted FreeBSD CDROM on device %s as /cdrom\n", dev->devname);
return TRUE;
}
OpenPOWER on IntegriCloud