diff options
author | Andreas Schneider <asn@samba.org> | 2019-12-09 10:47:46 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-10 00:30:29 +0000 |
commit | adfdcc4791b9a5706c48789bfbb46f256ee10538 (patch) | |
tree | 6bcb1f5a1dbe5670223d5ecae825391f5900f612 | |
parent | 8753d5f4567e1bc39c25ea11d444bed6d0afea46 (diff) | |
download | samba-adfdcc4791b9a5706c48789bfbb46f256ee10538.tar.gz |
s3:lib: Move NULL check before messaging_dgm_out_rearm_idle_timer()
We dereference out in messaging_dgm_out_rearm_idle_timer().
Found by covscan.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source3/lib/messages_dgm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index 11cb6969e73..661e032b908 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -322,7 +322,6 @@ 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 @@ -330,6 +329,7 @@ static int messaging_dgm_out_get(struct messaging_dgm_context *ctx, pid_t pid, if (out == NULL) { return EINVAL; } + messaging_dgm_out_rearm_idle_timer(out); *pout = out; return 0; |