summaryrefslogtreecommitdiff
path: root/yacc/reader.c
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2015-08-04 20:32:11 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2015-08-04 20:32:11 +0000
commit1714cfa5ec0e008912d27f91bc138481e7330250 (patch)
tree0a0e1330de8f6c0a97967c7b1b97e9ce7d06adcf /yacc/reader.c
parent32511c53af5a052436f2a9f1cee0f0871ea8bd1c (diff)
downloadocaml-1714cfa5ec0e008912d27f91bc138481e7330250.tar.gz
fix an issue spotted by the Clang analyzer (leak in yacc/reader.c)
yacc/reader.c:1328:7: warning: Potential leak of memory pointed to by 'a_line' fprintf(f, ")\n# 0\n "); ^~~~~~~ git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'yacc/reader.c')
-rw-r--r--yacc/reader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/yacc/reader.c b/yacc/reader.c
index cf6d7021d3..573a9744ae 100644
--- a/yacc/reader.c
+++ b/yacc/reader.c
@@ -1336,6 +1336,7 @@ loop:
fprintf(f, " : '%s))\n", plhs[nrules]->name);
if (sflag)
fprintf(f, "\n");
+ FREE(a_line);
return;
}
putc(c, f);