compress: Fix scanbuild error about dereference of null pointer.
Issue reports: vbdev_compress.c:468:34: warning: Dereference of null pointer src_mbufs[iov_index]->userdata = reduce_cb_arg; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Add assert here is enough. Change-Id: I8dccf107a89f7af46437a1f678adccf122beb4b2 Signed-off-by: yidong0635 <dongx.yi@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462592 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b3d9ebae21
commit
425b89a4ed
@ -470,6 +470,7 @@ _compress_operation(struct spdk_reduce_backing_dev *backing_dev, struct iovec *s
|
||||
|
||||
current_src_iov = src_iovs[iov_index].iov_base;
|
||||
total_length += src_iovs[iov_index].iov_len;
|
||||
assert(src_mbufs[iov_index] != NULL);
|
||||
src_mbufs[iov_index]->userdata = reduce_cb_arg;
|
||||
|
||||
rte_pktmbuf_attach_extbuf(src_mbufs[iov_index],
|
||||
|
Loading…
Reference in New Issue
Block a user