]> Git Repo - u-boot.git/commit
malloc_simple: calloc: don't call memset if malloc failed
authorSimon Goldschmidt <[email protected]>
Thu, 16 Aug 2018 07:50:32 +0000 (09:50 +0200)
committerTom Rini <[email protected]>
Fri, 24 Aug 2018 17:20:19 +0000 (13:20 -0400)
commitf3da76ea8b4c559ac0dc9206dc1676dde2224cd8
treefe749c4817f565b0f109ac032101d781aad2018b
parenta5e34fc0b628627cbda444a19a896895cfb4c552
malloc_simple: calloc: don't call memset if malloc failed

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 <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
common/malloc_simple.c
This page took 0.028333 seconds and 4 git commands to generate.