mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacmn: Avoid NULL pointer dereference
Avoid NULL pointer dereference in wlan_crypto_fils_delkey() Change-Id: I2425365f7e118b5ec72223905ce7d16437ee714d CRs-Fixed: 2221348
This commit is contained in:
parent
35fc699c0f
commit
65817ac2d7
1 changed files with 5 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -429,9 +429,10 @@ void wlan_crypto_fils_delkey(struct wlan_objmgr_peer *peer)
|
|||
}
|
||||
|
||||
key = crypto_priv->key[0];
|
||||
if (key && key->private)
|
||||
qdf_mem_free((struct wlan_crypto_fils_aad_key *)key->private);
|
||||
key->private = 0;
|
||||
if (key) {
|
||||
qdf_mem_free(key->private);
|
||||
key->private = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue