diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-06-27 15:39:04 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-06-27 15:39:04 +0000 |
commit | 90fb5e569a9ff2789ab60632d0802993f9c5238f (patch) | |
tree | e76e7a4a2d4786c8921b5eb7dade42bcd8d9bca8 /sys/arch/vax | |
parent | ffac3c76cd28758584ecc6b477a1876e6e300d4d (diff) |
Memory leak in attach if uballoc() fails; Brainy/Maxime Villard
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/if/if_qe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c index fae242274a7..6be68b83783 100644 --- a/sys/arch/vax/if/if_qe.c +++ b/sys/arch/vax/if/if_qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qe.c,v 1.32 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: if_qe.c,v 1.33 2015/06/27 15:39:03 miod Exp $ */ /* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -160,8 +160,10 @@ qematch(struct device *parent, struct cfdata *cf, void *aux) */ ui.ui_size = PROBESIZE; ui.ui_vaddr = (caddr_t)&ring[0]; - if ((error = uballoc((void *)parent, &ui, UBA_CANTWAIT))) + if ((error = uballoc((void *)parent, &ui, UBA_CANTWAIT))) { + free(ring, M_TEMP, PROBESIZE); return 0; + } /* * Init a simple "fake" receive and transmit descriptor that |