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

Commit 0042c31f authored by Odelu Kukatla's avatar Odelu Kukatla
Browse files

msm: msm_bus: fix the memory leak issue



Client name allocated dynamically during the registration
is not freed at the time of unregistration. This is
leading to memory leak issue. This patch fixes the issue
by freeing up the client name during unregistartion time.

Change-Id: I0fe75ce71fdf0ee9a1268d52ac244047cc3413d7
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
Signed-off-by: default avatarOdelu Kukatla <okukatla@codeaurora.org>
parent 630218f7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is Mree software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1349,6 +1349,7 @@ static void unregister_adhoc(struct msm_bus_client_handle *cl)
				cl->first_hop, cl->active_only);
	commit_data();
	msm_bus_dbg_remove_client(cl);
	kfree(cl->name);
	kfree(cl);
exit_unregister_client:
	rt_mutex_unlock(&msm_bus_adhoc_lock);