aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/scheme.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-11-23 11:35:15 +0000
committerJustus Winter <[email protected]>2016-11-23 11:51:56 +0000
commit3fb9954c43425775a517060959dad01fa00238f7 (patch)
treed23aa2a2b10036208250ab71ff45b40e37616f27 /tests/gpgscm/scheme.c
parentgpgscm: Fix initialization of 'sink'. (diff)
downloadgnupg-3fb9954c43425775a517060959dad01fa00238f7.tar.gz
gnupg-3fb9954c43425775a517060959dad01fa00238f7.zip
gpgscm: Clean sweeped cells.
* tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/scheme.c')
-rw-r--r--tests/gpgscm/scheme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 673d19928..d088931e4 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -1569,10 +1569,10 @@ static void gc(scheme *sc, pointer a, pointer b) {
/* reclaim cell */
if (typeflag(p) & T_FINALIZE) {
finalize_cell(sc, p);
- typeflag(p) = 0;
- car(p) = sc->NIL;
}
++sc->fcells;
+ typeflag(p) = 0;
+ car(p) = sc->NIL;
cdr(p) = sc->free_cell;
sc->free_cell = p;
}