diag: dci: Check for valid dci client entry
This patch adds the check for dci client entry validity before being accessed for its structure member. CRs-Fixed: 1097921 Change-Id: I30307599a86fff5174da1022361294e83ed8b761 Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This commit is contained in:
parent
314869eb56
commit
58852d2945
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -2203,6 +2203,7 @@ struct diag_dci_client_tbl *dci_lookup_client_entry_pid(int tgid)
|
|||
struct diag_dci_client_tbl *entry = NULL;
|
||||
list_for_each_safe(start, temp, &driver->dci_client_list) {
|
||||
entry = list_entry(start, struct diag_dci_client_tbl, track);
|
||||
if (entry->client && entry->tgid == entry->client->tgid)
|
||||
if (entry->client->tgid == tgid)
|
||||
return entry;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue