mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 01:01:27 +00:00
iscsi-scst: Fix use of uninitialized struct field
This patch fixes the following Coverity complaint:
CID 271606 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value event.
Field event.target_name is uninitialized when calling __event_send.
This commit is contained in:
@@ -193,7 +193,6 @@ struct iscsi_kern_event {
|
||||
u32 cid;
|
||||
u32 code;
|
||||
u32 cookie;
|
||||
char target_name[ISCSI_NAME_LEN];
|
||||
u32 param1_size;
|
||||
u32 param2_size;
|
||||
};
|
||||
|
||||
@@ -129,7 +129,7 @@ int event_send(u32 tid, u64 sid, u32 cid, u32 cookie,
|
||||
{
|
||||
int err;
|
||||
static DEFINE_MUTEX(event_mutex);
|
||||
struct iscsi_kern_event event;
|
||||
struct iscsi_kern_event event = {};
|
||||
int param1_size, param2_size;
|
||||
|
||||
param1_size = (param1 != NULL) ? strlen(param1) : 0;
|
||||
|
||||
Reference in New Issue
Block a user