shithub: git9

Download patch

ref: d52d3d898746cb77b6607d42497fb3d0fd599cd0
parent: 7f781ad522b14fbe48d8b4991c65eea831f89b08
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Sep 5 22:15:23 EDT 2020

ref: fix memory leak

--- a/ref.c
+++ b/ref.c
@@ -554,6 +554,7 @@
 	for(i = 0; i < ev.nstk; i++)
 		h[i] = ev.stk[i]->hash;
 	*r = h;
+	free(ev.stk);
 	return ev.nstk;
 }
 
@@ -572,6 +573,7 @@
 		return -1;
 	}
 	*r = ev.stk[0]->hash;
+	free(ev.stk);
 	return 0;
 }