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

Commit 1206c499 authored by Dundi Raviteja's avatar Dundi Raviteja
Browse files

wlan: use vos_mem_malloc to allocate memory

kzalloc() is used to allocate memory for pkt_stats_buffers and
vos_mem_free() is used to free memory. This results in memory leak.

To address this use vos_mem_malloc() to allocate memory.

Change-Id: I79da24da7002829b2d1721ec479f907d54a01a8a
CRs-Fixed: 2733628
parent 33c65e8a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1512,8 +1512,8 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf,
	{
		pr_info("%s: Initalizing Pkt stats pkt_stats_buff = %d\n",
			__func__, pkt_stats_buff);
		pkt_stats_buffers = (struct pkt_stats_msg *) kzalloc(
			 pkt_stats_buff * sizeof(struct pkt_stats_msg), GFP_KERNEL);
		pkt_stats_buffers = (struct pkt_stats_msg *) vos_mem_malloc(
			 pkt_stats_buff * sizeof(struct pkt_stats_msg));
		if (!pkt_stats_buffers) {
			pr_err("%s: Could not allocate memory for Pkt stats\n", __func__);
			failure = TRUE;