Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2d010ad authored by Dundi Raviteja's avatar Dundi Raviteja
Browse files

wlan: Avoid memory leak in WCTS_smd_resp_process

Avoid memory leak in WCTS_smd_resp_process() if
memory allocation failed buffer.

Change-Id: Ia20379416de1d8f95e188bcfdb2be0471c19abc8
CRs-Fixed: 2771722
parent 4748735f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@ int WCTS_smd_resp_process(struct rpmsg_device *rpdev,
	msg->buf_len = len;
	msg->buffer = wpalMemoryAllocate(len);
	if (!msg->buffer) {
		wpalMemoryFree(msg);
		WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
			   "WCTS_smd_resp_process: Memory allocation failure");
		WPAL_ASSERT(0);