mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
iscsi-scst/conftest/bad_wr_mod: Fix a Coverity complaint
Fix the following Coverity complaint: CID 326815 (#1 of 1): Explicit null dereferenced (FORWARD_NULL) 2. var_deref_model: Passing null pointer qp to ib_post_recv, which dereferences it. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
static int modinit(void)
|
||||
{
|
||||
struct ib_qp *qp = NULL;
|
||||
const struct ib_recv_wr *recv_wr = NULL;
|
||||
const struct ib_recv_wr **bad_recv_wr = NULL;
|
||||
struct ib_qp qp = { };
|
||||
const struct ib_recv_wr recv_wr = { };
|
||||
const struct ib_recv_wr *bad_recv_wr;
|
||||
|
||||
return ib_post_recv(qp, recv_wr, bad_recv_wr);
|
||||
return ib_post_recv(&qp, &recv_wr, &bad_recv_wr);
|
||||
}
|
||||
|
||||
module_init(modinit);
|
||||
|
||||
Reference in New Issue
Block a user