lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Jan 2019 10:23:51 +0900
From:   MyungJoo Ham <myungjoo.ham@...sung.com>
To:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        Yangtao Li <tiny.windzz@...il.com>
CC:     Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/3] PM / devfreq: fix mem leak in devfreq_add_device()

>'devfreq' is malloced in devfreq_add_device() and should be freed in
>the error handling cases, otherwise it will cause memory leak.
>
>Signed-off-by: Yangtao Li <tiny.windzz@...il.com>

Acked-by: MyungJoo Ham <myungjoo.ham@...sung.com>


>---
> drivers/devfreq/devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>index 923889229a0b..fe6c157cb7e0 100644
>--- a/drivers/devfreq/devfreq.c
>+++ b/drivers/devfreq/devfreq.c
>@@ -651,7 +651,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
> 		mutex_unlock(&devfreq->lock);
> 		err = set_freq_table(devfreq);
> 		if (err < 0)
>-			goto err_out;
>+			goto err_dev;
> 		mutex_lock(&devfreq->lock);
> 	}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ