OSDN Git Service

PM / devfreq: fix mem leak in devfreq_add_device()
authorYangtao Li <tiny.windzz@gmail.com>
Sat, 19 Jan 2019 16:04:54 +0000 (11:04 -0500)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 16 Apr 2019 00:29:18 +0000 (09:29 +0900)
commita9487917ba6728dd618ae6d418a7f2197f1b4592
tree8d2ba76caaeedfed1f4c9ebe6c320c706bd55a83
parent0d00a239f70fa52eb23837ffacf990f8404ecace
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@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c