Coverity CID 877: Prevent NULL deref.
This commit is contained in:
parent
c8a3069e94
commit
bb7bab2df4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: c_sh.c,v 1.10 2005/06/26 19:09:00 christos Exp $ */
|
||||
/* $NetBSD: c_sh.c,v 1.11 2006/03/18 07:24:40 christos Exp $ */
|
||||
|
||||
/*
|
||||
* built-in Bourne commands
|
||||
|
@ -6,7 +6,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: c_sh.c,v 1.10 2005/06/26 19:09:00 christos Exp $");
|
||||
__RCSID("$NetBSD: c_sh.c,v 1.11 2006/03/18 07:24:40 christos Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -616,7 +616,8 @@ c_brkcont(wp)
|
|||
* shall be used. Doesn't say to print an error but we
|
||||
* do anyway 'cause the user messed up.
|
||||
*/
|
||||
last_ep->flags &= ~EF_BRKCONT_PASS;
|
||||
if (last_ep)
|
||||
last_ep->flags &= ~EF_BRKCONT_PASS;
|
||||
warningf(TRUE, "%s: can only %s %d level(s)",
|
||||
wp[0], wp[0], n - quit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue