From 63562bb4ef0d6ee89aedbbe2ef05528eb096c5ee Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Thu, 17 Nov 2011 00:32:33 +0400 Subject: [PATCH] Fix memory leak in klacks --- klacks/klacks-impl.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/klacks/klacks-impl.lisp b/klacks/klacks-impl.lisp index 50b136b..382a68e 100644 --- a/klacks/klacks-impl.lisp +++ b/klacks/klacks-impl.lisp @@ -310,6 +310,7 @@ (with-source (source current-key current-values current-attributes) (setf current-key :end-element) (setf current-attributes nil) + (pop (base-stack *ctx*)) (validate-end-element *ctx* (third current-values)) cont)) @@ -318,12 +319,15 @@ current-key current-values current-attributes namespace-stack current-namespace-declarations) (let ((values* current-values) - (new-b current-namespace-declarations)) + (new-b current-namespace-declarations) + (ns-stack namespace-stack)) (setf current-attributes nil) (push n-b namespace-stack) (let ((finish (lambda () + (pop (base-stack *ctx*)) (setf current-namespace-declarations new-b) + (setf namespace-stack ns-stack) (klacks/element-3 source input values* cont)))) (klacks/content source input finish)))))