gpgscm: Clean sweeped cells.
authorJustus Winter <justus@g10code.com>
Wed, 23 Nov 2016 11:35:15 +0000 (12:35 +0100)
committerJustus Winter <justus@g10code.com>
Wed, 23 Nov 2016 11:51:56 +0000 (12:51 +0100)
* tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/scheme.c

index 673d199..d088931 100644 (file)
@@ -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;
       }