[dpdk-dev] [PATCH] net/virtio: fix null pointer dereference

2016-07-05 Thread Yuanhan Liu
On Tue, Jul 05, 2016 at 11:42:59AM +, Jianfeng Tan wrote: > There is a logic bug in this code, that could lead to null pointer > dereference when cvq is NULL. Fix this problem by changing logic > _and_ to logic _or_. > >>> CID 127480: Null pointer dereferences (FORWARD_NULL) >>> Dere

[dpdk-dev] [PATCH] net/virtio: fix null pointer dereference

2016-07-05 Thread Jianfeng Tan
There is a logic bug in this code, that could lead to null pointer dereference when cvq is NULL. Fix this problem by changing logic _and_ to logic _or_. >> CID 127480: Null pointer dereferences (FORWARD_NULL) >> Dereferencing null pointer "cvq". if (!cvq && !cvq->vq) {