summaryrefslogtreecommitdiffstats
path: root/tests/gpgscm
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2016-11-17 11:58:34 +0100
committerJustus Winter <justus@g10code.com>2016-11-17 13:25:14 +0100
commit4f189325a409bb08f7a8eabfac3f4579288cf5c5 (patch)
treea2aca7a06b0d7397771e900b59c027ae2cae0c11 /tests/gpgscm
parentgpgscm: Fix string. (diff)
downloadgnupg2-4f189325a409bb08f7a8eabfac3f4579288cf5c5.tar.xz
gnupg2-4f189325a409bb08f7a8eabfac3f4579288cf5c5.zip
gpgscm: Re-enable the garbage collector in case of errors.
* tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'. Fixes-commit: 83c184a66b73f312425b01008f0495610e5329a4 Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests/gpgscm')
-rw-r--r--tests/gpgscm/scheme.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index fe8b9dd4f..ee8992e1c 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -709,7 +709,8 @@ gc_reservation_failure(struct scheme *sc)
/* Disable the garbage collection and reserve the given number of
* cells. gc_disable may be nested, but the enclosing reservation
- * must include the reservations of all nested calls. */
+ * must include the reservations of all nested calls. Note: You must
+ * re-enable the gc before calling Error_X. */
static void
_gc_disable(struct scheme *sc, size_t reserve, int lineno)
{
@@ -3013,6 +3014,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
sc->args = cons(sc, sc->value, sc->args);
if (is_pair(sc->code)) { /* continue */
if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
+ gc_enable(sc);
Error_1(sc, "Bad syntax of binding spec in let :",
car(sc->code));
}