diff options
author | luigi <luigi@FreeBSD.org> | 2000-07-17 20:03:27 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2000-07-17 20:03:27 +0000 |
commit | a44e53d698aeecde8648d1eeb7eba464c3833d69 (patch) | |
tree | 4a31740fa479c7a46d8bf1b0f3c63381e13d3c78 /sys/netinet/ip_dummynet.c | |
parent | 2f0eda9a3b9848da7a1fc086c111954980045263 (diff) | |
download | FreeBSD-src-a44e53d698aeecde8648d1eeb7eba464c3833d69.zip FreeBSD-src-a44e53d698aeecde8648d1eeb7eba464c3833d69.tar.gz |
close PR 19544 - ipfw pipe delete causes panic when no pipes defined
PR: 19544
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 39492b9..7b1163b 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -1549,7 +1549,7 @@ delete_pipe(struct dn_pipe *p) /* locate pipe */ for (a = NULL , b = all_pipes ; b && b->pipe_nr < p->pipe_nr ; a = b , b = b->next) ; - if (b && b->pipe_nr != p->pipe_nr) + if (b == NULL || b->pipe_nr != p->pipe_nr) return EINVAL ; /* not found */ s = splnet() ; @@ -1585,7 +1585,7 @@ delete_pipe(struct dn_pipe *p) /* locate set */ for (a = NULL, b = all_flow_sets ; b && b->fs_nr < p->fs.fs_nr ; a = b , b = b->next) ; - if (b && b->fs_nr != p->fs.fs_nr) + if (b == NULL || b->fs_nr != p->fs.fs_nr) return EINVAL ; /* not found */ s = splnet() ; |