mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
soccr: don't dereference data before null check
CID 173075 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking data suggests that it may be null, but it has already been dereferenced on all paths leading to the check. travis-ci: success for soccr: don't dereference data before null check Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
f3e3958bb0
commit
ed5081041c
1 changed files with 3 additions and 2 deletions
|
|
@ -400,15 +400,16 @@ static int set_queue_seq(struct libsoccr_sk *sk, int queue, __u32 seq)
|
|||
static int libsoccr_set_sk_data_noq(struct libsoccr_sk *sk,
|
||||
struct libsoccr_sk_data *data, unsigned data_size)
|
||||
{
|
||||
int mstate = 1 << data->state;
|
||||
struct tcp_repair_opt opts[4];
|
||||
int addr_size;
|
||||
int addr_size, mstate;
|
||||
int onr = 0;
|
||||
__u32 seq;
|
||||
|
||||
if (!data || data_size < SOCR_DATA_MIN_SIZE)
|
||||
return -1;
|
||||
|
||||
mstate = 1 << data->state;
|
||||
|
||||
if (data->state == TCP_LISTEN)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue