memory allocation without checks
andreas moroder
claudiamoroder at st-ulrich.suedtirol.net
Sun Oct 14 23:55:22 GMT 2001
Hello,
I did read Andrew's statement about allocation failures, and I repeat it here
"I'll fix this for the sake of completeness, but please remember that
it is not allocation failures that cause memory leaks. Allocation
failures are *extremely* rare on unix systems. So rare that making an
allocation failure cause a exit(1) would not be completely
unreasonable " ( Andrew Tridgell )
I am sure that is true, but there is NO good reason not to check if it the
allocation worked or not, so I will continue to post if I find more missing
checks in HEAD
in libsmb/cli_samr.c
in the lines 808,809, 815, 876 and 877 there are talloc calls without a check
in libsmb/cli_spoolss.c most the talloc of info are unchecked.
in utils/smbcacls.c at line 812 the talloc_init result is unchecked.
int tbd/tdb.c at line 693
realloc is used instead of Realloc and the same pointer is use as result and
as parameter ( possible cause of leak )
Bye
Andreas
More information about the samba-technical
mailing list