]> Savannah Git Hosting - gnulib.git/commit
dfa: omit unneeded malloc+free
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 18:36:30 +0000 (11:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 18:37:08 +0000 (11:37 -0700)
commitb03cdc1b6fbc7abae6befd254bf440861aad8ec7
tree785ff53216483dd5fe1a272dbca932c5a5a3591c
parent7c6538cf0584a5ad3e2e46f64b1936eea4cddecc
dfa: omit unneeded malloc+free

Problem indirectly found by Coverity.
* lib/dfa.c (enlistnew): New function, with most of the body of
the old ‘enlist’.  It assumes its arg NEW has been malloced and
can be freed eventually.
(enlist, addlists, dfamust): Use it.
(dfamust): Omit an unnecessary malloc+free.
ChangeLog
lib/dfa.c