diff options
author | 2016-10-07 11:58:00 +0100 | |
---|---|---|
committer | 2016-10-07 13:57:55 +0100 | |
commit | 1c436f7f29a3ba668590c5ddcfb8842f2f1e6e0c (patch) | |
tree | e626e2e76e7c85759ffd4d82911e19338adbdf31 /lib/libtle_udp | |
parent | 300fdaf82b09d3527554ceb083184628190d9033 (diff) |
libtle_udp: fix possible dereference of NULL ptr in tle_udp_del_dev()
Change-Id: I09661a97206e8714c05f4c4f31d23d250cd0933a
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'lib/libtle_udp')
-rw-r--r-- | lib/libtle_udp/udp_ctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libtle_udp/udp_ctl.c b/lib/libtle_udp/udp_ctl.c index 618a7ef..c8580ac 100644 --- 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) || |