diff options
author | 2012-04-11 21:12:55 +0000 | |
---|---|---|
committer | 2012-04-11 21:12:55 +0000 | |
commit | 4665de98d8cb829207d60a93a9837c382311561c (patch) | |
tree | 6bc4afe694db7c544c8bc127428922e430c9f693 | |
parent | Recommend using "unsigned int" instead of just "unsigned". (diff) | |
download | wireguard-openbsd-4665de98d8cb829207d60a93a9837c382311561c.tar.xz wireguard-openbsd-4665de98d8cb829207d60a93a9837c382311561c.zip |
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) { |