Scanbuild error on fedora30 reports: warning: Array access (via field 'write_buf') results in a null pointer dereference if (context->write_buf[i]) { In deallocated_value.c, cleanup function be used at many places to deal with failed cases even context->write_buf is NULL, so add context->write_buf pointer check before array data. I think context->read_buf is the same. This is related to issue #822. Change-Id: I33c685fd732da820c1dfc861eb991b92b41caa29 Signed-off-by: yidong0635 <dongx.yi@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458736 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
deallocated_value.c | ||
Makefile |