diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-12-28 08:38:24 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-12-28 10:31:53 +0000 |
commit | de1fb17ac392427605ead87690f30f1a488f66a7 (patch) | |
tree | 32c371cc38744a7e44fb576619ca01f565bd3444 /rpc | |
parent | 89f1ebef957813f1262603ea5ec82539edb1ecad (diff) |
rpc : fix coverity in rpc/rpc-lib/src/rpcsvc.c
This patch fixes newly introduced coverity.
CID: 1398472: Dereference before null check.
updates: bz#789278
Change-Id: Ie9b13084097de8f24b138acd7608c3e15b3bba9c
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index dbb07be7fa2..5342376da46 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -2211,9 +2211,9 @@ rpcsvc_request_handler(void *arg) list_for_each_entry_safe(req, tmp_req, &tmp_list, request_list) { - list_del_init(&req->request_list); - if (req) { + list_del_init(&req->request_list); + if (req->prognum == RPCSVC_INFRA_PROGRAM) { switch (req->procnum) { case RPCSVC_PROC_EVENT_THREAD_DEATH: |