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
这个提交包含在:
gaurank kathpalia
2021-02-23 17:04:11 +05:30
提交者 snandini
父节点 76469c8aee
当前提交 fffe13cbc9
修改 2 个文件,包含 5 行新增5 行删除

查看文件

@@ -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);