summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2005-07-29 16:59:27 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2005-07-29 16:59:27 +0000
commit278df2e880589566805d51aa43d1c59b25e48d88 (patch)
tree596bd8765e781309c651272061eeadc6c3e7686a /sys/dev
parentfa9ee9c6d9e141cfeda7255635903b2ced84bc91 (diff)
oops don't leak memory when ami_mgmt fails.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/ami.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index ce327a32f1e..b37a5a6afe3 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.50 2005/07/29 16:56:13 marco Exp $ */
+/* $OpenBSD: ami.c,v 1.51 2005/07/29 16:59:26 marco Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1887,7 +1887,7 @@ ami_ioctl_inq(sc, bi)
if (ami_mgmt(sc, AMI_FCOP, AMI_FC_RDCONF, 0, sizeof *p, p)) {
error = EINVAL;
- goto bail;
+ goto bail2;
}
memset(plist, 0, sizeof plist);
@@ -1910,6 +1910,7 @@ ami_ioctl_inq(sc, bi)
}
}
+bail2:
free(plist, M_DEVBUF);
bail:
free(p, M_DEVBUF);