Re: [PATCH] hwmon: (pmbus) Fix krealloc() misuse in pmbus_add_attribute()

2013-03-14 Thread Guenter Roeck
On Thu, Mar 14, 2013 at 01:30:20PM +, David Woodhouse wrote: > If krealloc() returns NULL, it *doesn't* free the original. So any code > of the form 'foo = krealloc(foo, …);' is almost certainly a bug. > > Signed-off-by: David Woodhouse Good catch. Thanks a lot for the fix! Guenter -- To un

[PATCH] hwmon: (pmbus) Fix krealloc() misuse in pmbus_add_attribute()

2013-03-14 Thread David Woodhouse
If krealloc() returns NULL, it *doesn't* free the original. So any code of the form 'foo = krealloc(foo, …);' is almost certainly a bug. Signed-off-by: David Woodhouse --- drivers/hwmon/pmbus/pmbus_core.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/hw