mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +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:
committed by
Pavel Emelyanov
parent
f3e3958bb0
commit
ed5081041c
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user