netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wlcore: Fix memory leak in wlcore_cmd_wait_for_event_or_timeout
@ 2018-06-28 13:08 Gustavo A. R. Silva
  2018-07-02 11:30 ` Tony Lindgren
  2018-07-04 15:14 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-06-28 13:08 UTC (permalink / raw)
  To: Tony Lindgren, Kalle Valo, David S. Miller
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Gustavo A. R. Silva

In case memory resources for *events_vector* were allocated, release
them before return.

Addresses-Coverity-ID: 1470194 ("Resource leak")
Fixes: 4ec7cece87b3 ("wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()")
Signed-off-by: Gustavo A. R. Silva <gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>
---
 drivers/net/wireless/ti/wlcore/cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 836c616..9039687 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -195,8 +195,7 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 	ret = pm_runtime_get_sync(wl->dev);
 	if (ret < 0) {
 		pm_runtime_put_noidle(wl->dev);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-04 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-28 13:08 [PATCH] wlcore: Fix memory leak in wlcore_cmd_wait_for_event_or_timeout Gustavo A. R. Silva
2018-07-02 11:30 ` Tony Lindgren
2018-07-02 13:01   ` Gustavo A. R. Silva
2018-07-04 15:14 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).