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

From: Guenter Roeck
Date: Thu Mar 14 2013 - 09:59:27 EST


On Thu, Mar 14, 2013 at 01:30:20PM +0000, 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 <David.Woodhouse@xxxxxxxxx>

Good catch. Thanks a lot for the fix!

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/