diff options
| author | christos <christos@NetBSD.org> | 2006-05-25 01:44:28 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2006-05-25 01:44:28 +0000 |
| commit | d8050237b65c40eb3bd3932dab5d863098dee93d (patch) | |
| tree | 5bef9f2be2b81c4b3aaa8666bf8020d23a4733e9 | |
| parent | 4aafa6340a7cb89dd97ac53f0d506c416d299e12 (diff) | |
Coverity CID 1188: Don't check for NULL just to log and then die
de-referencing; return instead.
| -rw-r--r-- | usr.sbin/mrouted/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/mrouted/route.c b/usr.sbin/mrouted/route.c index 6063abba1cb..96797d1e915 100644 --- a/usr.sbin/mrouted/route.c +++ b/usr.sbin/mrouted/route.c @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.11 2003/05/16 22:59:50 dsl Exp $ */ +/* $NetBSD: route.c,v 1.12 2006/05/25 01:44:28 christos Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -287,6 +287,7 @@ create_route(u_int32_t origin, u_int32_t mask) (2 * numvifs * sizeof(u_int32_t)) + (numvifs * sizeof(u_int)))) == NULL) { logit(LOG_ERR, 0, "ran out of memory"); /* fatal */ + return; } r->rt_origin = origin; r->rt_originmask = mask; |
