[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument
Re: [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument-to-free
Sun, 14 Mar 2010 10:19:16 +0900
> I'm not happy with removing the null checks in calls to free(); there
> were systems out there that would throw a fatal error if you passed
> null to free(). I'd prefer to leave those checks in.
Though I also thought so first, in this case I seem it's guaranteed that
elements that is smaller than d->tralloc isn't NULL, as long as a
programmer who doesn't know the rule of `dfa' structure usage purposely
call `free' and set null for then.