tttm

git clone https://orangeshoelaces.net/git/tttm.git

31d64a6667a72ed14ac0f327f87e4723500f8bb4

Author: Vasily Kolobkov on 05/28/2016

Committer: Vasily Kolobkov on 05/28/2016

First backup, then unmap when tearing down parser

Stats

parser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/parser.c b/parser.c
index bb6248a..37dbd5d 100644
--- a/parser.c
+++ b/parser.c
@@ -422,9 +422,10 @@ par_free(struct parctx *p)
 {
 	int e;
 
+	if (e = par_backup(p))
+		goto exit;
 	if (p->strstor == SS_CACHE && munmap(p->wnd, wndcap) == -1)
 		goto evm;
-	e = par_backup(p);
  exit:
 	return e;
  evm: