mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-11 23:59:50 +02:00
gpgscm: Re-enable the garbage collector in case of errors.
* tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'.
Fixes-commit: 83c184a66b
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
fc53a4d06e
commit
4f189325a4
|
@ -709,7 +709,8 @@ gc_reservation_failure(struct scheme *sc)
|
||||||
|
|
||||||
/* Disable the garbage collection and reserve the given number of
|
/* Disable the garbage collection and reserve the given number of
|
||||||
* cells. gc_disable may be nested, but the enclosing reservation
|
* 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
|
static void
|
||||||
_gc_disable(struct scheme *sc, size_t reserve, int lineno)
|
_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);
|
sc->args = cons(sc, sc->value, sc->args);
|
||||||
if (is_pair(sc->code)) { /* continue */
|
if (is_pair(sc->code)) { /* continue */
|
||||||
if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
|
if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
|
||||||
|
gc_enable(sc);
|
||||||
Error_1(sc, "Bad syntax of binding spec in let :",
|
Error_1(sc, "Bad syntax of binding spec in let :",
|
||||||
car(sc->code));
|
car(sc->code));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user