X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/77d3741943947b83a5d6a10a5e31650a1005dbde..40fabe2650105c5ada4d352bdd15ebbb701c5693:/src/globalsClause.c diff --git a/src/globalsClause.c b/src/globalsClause.c index b73dbfb..c32465e 100644 --- a/src/globalsClause.c +++ b/src/globalsClause.c @@ -17,15 +17,15 @@ ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA. ** -** For information on lclint: lclint-request@cs.virginia.edu -** To report a bug: lclint-bug@cs.virginia.edu +** For information on splint: info@splint.org +** To report a bug: splint-bug@splint.org ** For more information: http://www.splint.org */ /* ** globalsClause.c */ -# include "lclintMacros.nf" +# include "splintMacros.nf" # include "basic.h" extern globalsClause @@ -33,7 +33,7 @@ globalsClause_create (lltok tok, globSet gl) { globalsClause res = (globalsClause) dmalloc (sizeof (*res)); res->globs = gl; - res->loc = lltok_stealLoc (tok); + res->loc = fileloc_copy (lltok_getLoc (tok)); /*@i423@*/ return res; /* releases doesn't seem to work right here... */ } @@ -51,6 +51,11 @@ globSet globalsClause_takeGlobs (globalsClause gclause) extern void globalsClause_free (globalsClause gclause) { + if (gclause == NULL) + { + return; /*@i435 shouldn't ever need this? */ + } + globSet_free (gclause->globs); sfree (gclause); }