diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-04-11 21:12:56 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-04-11 21:12:56 +0000 |
commit | 0d214a32b2e9bdd2529d5e9a3762645e0d43cbeb (patch) | |
tree | 70dc0339653815474c7bf7ee70bc1539981445c3 | |
parent | 388e8f3a022ae18dabffacda1afcf74c33a8a96f (diff) |
flush the log and abort() if we try to destroy a NULL aproc
-rw-r--r-- | usr.bin/aucat/aproc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c index c61fdb2b2a3..01603fb3ac3 100644 --- a/usr.bin/aucat/aproc.c +++ b/usr.bin/aucat/aproc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aproc.c,v 1.71 2012/04/11 06:05:43 ratchov Exp $ */ +/* $OpenBSD: aproc.c,v 1.72 2012/04/11 21:12:55 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -173,6 +173,12 @@ aproc_del(struct aproc *p) { struct abuf *i; +#ifdef DEBUG + if (!p) { + dbg_puts("aproc_del: called with NULL argument\n"); + dbg_panic(); + } +#endif if (!(p->flags & APROC_ZOMB)) { #ifdef DEBUG if (debug_level >= 3) { |