Code Review
/
tldk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
libtle_udp: fix possible dereference of NULL ptr in tle_udp_del_dev()
[tldk.git]
/
lib
/
libtle_udp
/
udp_ctl.c
diff --git
a/lib/libtle_udp/udp_ctl.c
b/lib/libtle_udp/udp_ctl.c
index
618a7ef
..
c8580ac
100644
(file)
--- a/
lib/libtle_udp/udp_ctl.c
+++ b/
lib/libtle_udp/udp_ctl.c
@@
-395,11
+395,10
@@
tle_udp_del_dev(struct tle_udp_dev *dev)
uint32_t p;
struct tle_udp_ctx *ctx;
- ctx = dev->ctx;
-
if (dev == NULL || dev->ctx == NULL)
return -EINVAL;
+ ctx = dev->ctx;
p = dev - ctx->dev;
if (p >= RTE_DIM(ctx->dev) ||