Re: [U-Boot] [PATCH 5/5] malloc_simple: calloc: don't call memset if malloc failed

2018-08-06 Thread Marek Vasut
On 08/05/2018 09:35 PM, Simon Goldschmidt wrote: > malloc_simple() can return 0 if out of memory. Don't call memset > from calloc() in this case but rely on the caller checking > the return value. > > Signed-off-by: Simon Goldschmidt > --- > > common/malloc_simple.c | 3 ++- > 1 file changed, 2

[U-Boot] [PATCH 5/5] malloc_simple: calloc: don't call memset if malloc failed

2018-08-05 Thread Simon Goldschmidt
malloc_simple() can return 0 if out of memory. Don't call memset from calloc() in this case but rely on the caller checking the return value. Signed-off-by: Simon Goldschmidt --- common/malloc_simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/malloc_simple.c