From 855af6120b70a3a7c2225562debb21591c510c7d Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Thu, 14 Jun 2012 22:37:10 +0900 Subject: [PATCH] sexp_release_object fix from Ben Weaver - wasn't releasing the first object in the list. --- AUTHORS | 1 + gc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index f8fb429f..ba2d365f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ Thanks to the following people for patches and bug reports: * Alexander Shendi * Andreas Rottman * Bakul Shah + * Ben Weaver * Bruno Deferrari * Doug Currie * Derrick Eddington diff --git a/gc.c b/gc.c index 88fcca86..ae32e0f0 100644 --- a/gc.c +++ b/gc.c @@ -85,7 +85,8 @@ void sexp_release_object(sexp ctx, sexp x) { ls1=ls2, ls2=sexp_cdr(ls2)) if (sexp_car(ls2) == x) { if (ls1) sexp_cdr(ls1) = sexp_cdr(ls2); - else sexp_global(ctx, SEXP_G_PRESERVATIVES) = ls2; + else sexp_global(ctx, SEXP_G_PRESERVATIVES) = sexp_cdr(ls2); + break; } }