projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d00a23
)
PM / devfreq: fix mem leak in devfreq_add_device()
author
Yangtao Li
<tiny.windzz@gmail.com>
Sat, 19 Jan 2019 16:04:54 +0000
(11:04 -0500)
committer
MyungJoo Ham
<myungjoo.ham@samsung.com>
Tue, 16 Apr 2019 00:29:18 +0000
(09:29 +0900)
'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@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c
patch
|
blob
|
history
diff --git
a/drivers/devfreq/devfreq.c
b/drivers/devfreq/devfreq.c
index 0ae3de76833b7da0c16f01ca79e482ec66217594..fa1bdde89ffc9a30745606b520e1008b3f27cb2a 100644
(file)
--- 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);
}