[U-Boot] [PATCH] LZMA: Avoid free on null pointer.

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Dec 5 11:12:41 CET 2010


>
> On structure Initialization, LZMA code tries to free the dictionary
> and probs buffers, also when these are null pointers. Add some
> check in order to prevent the free on null pointers.
>
> Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini at idf-hit.com>

Why not move these NULL checks inside LzmaDec_FreeProbs?
Then you don't have to litter the code with NULL checks
and LzmaDec_FreeProbs behaves like the standard free() function.

 Jocke



More information about the U-Boot mailing list