ffi: Fix free to update malloced-aliens.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Thu, 12 Jul 2012 21:46:25 +0000 (14:46 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Thu, 12 Jul 2012 21:46:25 +0000 (14:46 -0700)
src/runtime/ffi.scm

index a384257a18dc006188595c6e6c9730eb8081d4f5..50f0d9e3ff6bf545a634b325e82d877f3fca08a1 100644 (file)
@@ -394,7 +394,9 @@ USA.
                     (begin
                       (alien-null! alien)
                       ((ucode-primitive c-free 1) copy)
-                      (alien-null! copy))))))))))
+                      (alien-null! copy)
+                      (set! malloced-aliens
+                            (delq! weak malloced-aliens)))))))))))
 
 (define (weak-assq obj alist)
   (let loop ((alist alist))