qcacmn: Fix the pointer reset in cm_allocate_and_copy_ies_and_keys

In cm_allocate_and_copy_ies_and_keys instead of target's pointer
source's pointers are reset thus making the following code void

Fix this by resetting the target pointers which needs to be allocated
with new memory.

Change-Id: I4417492c43eb27833d365ec4aa644e07ed4eca51
CRs-fixed: 2884187
This commit is contained in:
gaurank kathpalia
2021-02-23 17:04:11 +05:30
committed by snandini
parent 76469c8aee
commit fffe13cbc9
2 changed files with 5 additions and 5 deletions

View File

@@ -1830,10 +1830,10 @@ cm_allocate_and_copy_ies_and_keys(struct wlan_cm_connect_req *target,
struct wlan_cm_connect_req *source)
{
/* Reset the copied pointers of target */
source->assoc_ie.ptr = NULL;
source->crypto.wep_keys.key = NULL;
source->crypto.wep_keys.seq = NULL;
source->scan_ie.ptr = NULL;
target->assoc_ie.ptr = NULL;
target->crypto.wep_keys.key = NULL;
target->crypto.wep_keys.seq = NULL;
target->scan_ie.ptr = NULL;
if (source->scan_ie.ptr) {
target->scan_ie.ptr = qdf_mem_malloc(source->scan_ie.len);