On 10/19/2015 12:20 PM, Stephen Hemminger wrote:

On Sun, 18 Oct 2015 14:28:59 +0800
Huawei Xie <huawei.xie at intel.com><mailto:huawei.xie at intel.com> wrote:



+               if (vq->sw_ring)
+                       rte_free(vq->sw_ring);
+



Do not need to test for NULL before calling rte_free.
Better to just rely on the fact that rte_free(NULL) is documented
to be ok (no operation).



 ok, btw, in previous commit, just in the same function,
void virtio_dev_queue_release(vq)
[...]

                           rte_free(vq);

                           vq = NULL;
I think there is no need to set NULL to vq. Will submit a patch to fix it if 
you agree.


Reply via email to