summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-02-23 12:30:16 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-02-23 12:30:16 +0000
commit10286330fb6149901eb5ff996e51c1cfca8af95e (patch)
treec26fba7f93c946317cdedbf57d906dcd2bc80bfe /sys/arch/mvme88k
parent15b8481ab43dc692c91cc1580802a91ab79e5942 (diff)
fix a memory leak
ok miod@
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/stand/wrtvid/wrtvid.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/mvme88k/stand/wrtvid/wrtvid.c b/sys/arch/mvme88k/stand/wrtvid/wrtvid.c
index 826daf6c908..8b9ab146bfc 100644
--- a/sys/arch/mvme88k/stand/wrtvid/wrtvid.c
+++ b/sys/arch/mvme88k/stand/wrtvid/wrtvid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wrtvid.c,v 1.7 2007/06/17 00:28:57 deraadt Exp $ */
+/* $OpenBSD: wrtvid.c,v 1.8 2014/02/23 12:30:15 jsg Exp $ */
/*
* Copyright (c) 1995 Dale Rahn <drahn@openbsd.org>
@@ -123,11 +123,9 @@ void
copy_exe(exe_file, tape_exe)
int exe_file, tape_exe;
{
- char *buf;
+ char buf[BUF_SIZ];
int cnt = 0;
- buf = (char *)malloc(BUF_SIZ);
-
lseek (exe_file, 0x20, SEEK_SET);
while (BUF_SIZ == (cnt = read(exe_file, buf, BUF_SIZ))) {
write(tape_exe, buf, cnt);