Re: [PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up memory leak

2014-06-02 Thread Rickard Strandqvist
Hi Okay, then I make a new patch with only the if() part of the code. Best regards Rickard Strandqvist 2014-06-02 19:08 GMT+02:00 Eduardo Valentin : > On Sun, Jun 01, 2014 at 01:33:51PM +0200, Rickard Strandqvist wrote: >> There is a risk for memory leak in when something unexpected happens >>

Re: [PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up memory leak

2014-06-02 Thread Eduardo Valentin
On Sun, Jun 01, 2014 at 01:33:51PM +0200, Rickard Strandqvist wrote: > There is a risk for memory leak in when something unexpected happens > and the function returns. I don't think there is a risk of memory leak, but wrong address access, in this case. > > This was largely found by using a stat

[PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up memory leak

2014-06-01 Thread Rickard Strandqvist
There is a risk for memory leak in when something unexpected happens and the function returns. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/thermal/ti-soc-thermal/ti-bandgap.c |3 ++- 1 file changed, 2 inserti