Skip to content

Commit

Permalink
s3:lib: Move NULL check before messaging_dgm_out_rearm_idle_timer()
Browse files Browse the repository at this point in the history
We dereference out in messaging_dgm_out_rearm_idle_timer().

Found by covscan.

Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Richard Sharpe <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
cryptomilk authored and abartlet committed Dec 10, 2019
1 parent 8753d5f commit adfdcc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source3/lib/messages_dgm.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ static int messaging_dgm_out_get(struct messaging_dgm_context *ctx, pid_t pid,
}
}

messaging_dgm_out_rearm_idle_timer(out);
/*
* shouldn't be possible, should be set if messaging_dgm_out_create
* succeeded. This check is to satisfy static checker
*/
if (out == NULL) {
return EINVAL;
}
messaging_dgm_out_rearm_idle_timer(out);

*pout = out;
return 0;
Expand Down

0 comments on commit adfdcc4

Please sign in to comment.