Sujet : Re: Fixing a sample from K&R book using cake static analyser
De : anton.txt (at) *nospam* gmail.moc (Anton Shepelev)
Groupes : comp.lang.cDate : 23. Jun 2024, 23:25:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240624012527.8bbe16b96f5bfca10feadb5c@gmail.moc>
References : 1 2 3 4
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Ben Bacarisse:
I don't get why the goto crowd want to complicate it so
much.
Will someone post a goto-less that fixes what I perceive as
bugs in the original:
a. the failure to free() a newly allocated nlist in case
of a later error,
b. the failure to free() a newly allocated np->name in
case of a later error,
c. the failure to keep np->defn unchaged if the
allocation of the new defn value failed.
And my perception be wrong, let us first establish the
actual bug(s).
-- () ascii ribbon campaign -- against html e-mail/\ www.asciiribbon.org -- against proprietary attachments