We have a few places where we're passing an uninitialised pointer
argument to the libnvme API in the MI tests. Add an explicit zero init
for these.
Fixes: https://github.com/linux-nvme/libnvme/issues/563
Reported-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
static void test_set_features(nvme_mi_ep_t ep)
{
struct nvme_set_features_args args = { 0 };
- struct nvme_timestamp tstamp;
+ struct nvme_timestamp tstamp = { 0 };
nvme_mi_ctrl_t ctrl;
uint32_t res;
int rc, i;
static void test_admin_ns_mgmt_create(struct nvme_mi_ep *ep)
{
- struct nvme_id_ns nsid;
+ struct nvme_id_ns nsid = { 0 };
nvme_mi_ctrl_t ctrl;
__u32 ns;
int rc;
static void test_admin_get_log_split(struct nvme_mi_ep *ep)
{
+ struct nvme_get_log_args args = { 0 };
unsigned char buf[4096 * 2 + 4];
- struct nvme_get_log_args args;
struct log_data ldata;
nvme_mi_ctrl_t ctrl;
int rc;