rtc: ds1307: Fix a memory leak
Several failure paths would result in control being transfered to
'exit' label, so instead of just returning error codes in those cases
we also need to free the memory allocated for 'ds1307'

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 5401408 commit 304cdde1677a77af010241801454dd58f2675fbe
@Andrey Smirnov Andrey Smirnov authored on 7 Jan 2016
Sascha Hauer committed on 7 Jan 2016
Showing 1 changed file
View
drivers/rtc/rtc-ds1307.c