qcacld-3.0: Free the NAN buffer when fail to serialize the command
When same NAN commands are issued back to back, serialization module rejects the commands when there is a command present in the pending queue. But the memory allocated for the NAN buffer is not freed in such failure cases. Free the NAN buffer in such failure cases to avoid memleaks. Change-Id: I1d1f9c077d4b6239f4400d9b3ed185e63e471b56 CRs-Fixed: 3341229
This commit is contained in:

committed by
Madan Koyyalamudi

parent
40b10658a5
commit
9d6fa2ef4d
@@ -315,6 +315,8 @@ QDF_STATUS nan_scheduled_msg_handler(struct scheduler_msg *msg)
|
||||
if (status != WLAN_SER_CMD_ACTIVE && status != WLAN_SER_CMD_PENDING) {
|
||||
nan_err("unable to serialize command");
|
||||
wlan_objmgr_vdev_release_ref(cmd.vdev, WLAN_NAN_ID);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user