Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: src/tspi/rpc/hosttable.c

Issue 6813030: Avoid shutdown-time crash in wpa_supplicant. (Closed) Base URL: http://git.chromium.org/git/trousers.git@master
Patch Set: move code to right location Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tspi/rpc/hosttable.c
diff --git a/src/tspi/rpc/hosttable.c b/src/tspi/rpc/hosttable.c
index f3ec2eb97e8fa6080f626fa1f59954f1d50acbf7..5595b66c515517b7a7412b927568dfb41019d23c 100644
--- a/src/tspi/rpc/hosttable.c
+++ b/src/tspi/rpc/hosttable.c
@@ -158,6 +158,10 @@ get_table_entry(TSS_HCONTEXT tspContext)
{
struct host_table_entry *index = NULL;
+ /* Avoid shutdown race in wpa_supplicant */
+ if (ht == NULL)
+ return NULL;
+
MUTEX_LOCK(ht->lock);
for (index = ht->entries; index; index = index->next) {
@@ -179,4 +183,3 @@ put_table_entry(struct host_table_entry *entry)
if (entry)
MUTEX_UNLOCK(entry->lock);
}
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698