From: Lawrence D'O. <ld...@ge...> - 2011-11-18 22:05:59
|
On Mon, 31 Oct 2011 21:20:04 +0200, Ville Skyttä wrote: > $ cppcheck -q src/dvdunauthor.c > [src/dvdunauthor.c:175]: (error) Common realloc mistake: 'fmtbuf' > nulled but not freed upon failure There are lots of these cases right through the code, and also of not checking the result from malloc. On Linux this is not usually a problem, since you normally won’t see such failures. I think the only reasonable solution is to create wrappers for malloc and realloc that print an error message and die on failure, and use these everywhere instead of directly calling malloc and realloc. |