summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_dummynet.c4
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() ;
OpenPOWER on IntegriCloud