Re: [PATCH] io_uring: Initialize variable before use

2021-03-31 Thread Muhammad Usama Anjum
On Wed, 2021-03-31 at 11:48 +0300, Dan Carpenter wrote: > On Mon, Mar 22, 2021 at 11:41:58PM +0500, Muhammad Usama Anjum wrote: > > 1) Initialize the struct msghdr msg in the start of the function > > 2) Uninitialized variable msg.msg_flags can get used if branch happens to > > out_free before init

Re: [PATCH] io_uring: Initialize variable before use

2021-03-31 Thread Dan Carpenter
On Mon, Mar 22, 2021 at 11:41:58PM +0500, Muhammad Usama Anjum wrote: > 1) Initialize the struct msghdr msg in the start of the function > 2) Uninitialized variable msg.msg_flags can get used if branch happens to > out_free before initialization. > > So initialize variable in question in the start

Re: [PATCH] io_uring: Initialize variable before use

2021-03-31 Thread Muhammad Usama Anjum
On Mon, 2021-03-22 at 23:41 +0500, Muhammad Usama Anjum wrote: > 1) Initialize the struct msghdr msg in the start of the function > 2) Uninitialized variable msg.msg_flags can get used if branch happens to > out_free before initialization. > > So initialize variable in question in the start of the

[PATCH] io_uring: Initialize variable before use

2021-03-22 Thread Muhammad Usama Anjum
1) Initialize the struct msghdr msg in the start of the function 2) Uninitialized variable msg.msg_flags can get used if branch happens to out_free before initialization. So initialize variable in question in the start of the function for simplicity in logic and use. Addresses-Coverity: ("Uniniti