]> git.baikalelectronics.ru Git - kernel.git/commit
eeprom: fix memory leak on buf when failed allocation of csraddr_str
authorColin Ian King <colin.king@canonical.com>
Tue, 24 Jan 2017 14:38:38 +0000 (14:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 10:41:44 +0000 (11:41 +0100)
commited8248fefb36063f4e7b3fca074e605cce9de21c
tree62067bb44fe9eabe71330c76ee1598bfb68e47ab
parent308a1583ebc6b9415243b5ef5ae0fac08fcad071
eeprom: fix memory leak on buf when failed allocation of csraddr_str

The error return path When csraddr_str fails to free buf, causing a
memory leak. Fix this by returning via the free_buf label that
performs the necessary cleanup.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/idt_89hpesx.c