CTABLES
[pspp] / src / language / stats / ctables.c
index a573afaad1ba99075265128c73a58b47fae3c557..7b7a81946ca29bbec057550e06772e5c99f15c9d 100644 (file)
@@ -1239,7 +1239,10 @@ ctables_axis_parse_nest (struct ctables_axis_parse_ctx *ctx)
     {
       struct ctables_axis *rhs = ctables_axis_parse_postfix (ctx);
       if (!rhs)
-        return NULL;
+        {
+          ctables_axis_destroy (lhs);
+          return NULL;
+        }
 
       struct ctables_axis *nest = ctables_axis_new_nonterminal (
         CTAO_NEST, lhs, rhs, ctx->lexer, start_ofs);
@@ -1285,7 +1288,10 @@ ctables_axis_parse_stack (struct ctables_axis_parse_ctx *ctx)
     {
       struct ctables_axis *rhs = ctables_axis_parse_nest (ctx);
       if (!rhs)
-        return NULL;
+        {
+          ctables_axis_destroy (lhs);
+          return NULL;
+        }
 
       lhs = ctables_axis_new_nonterminal (CTAO_STACK, lhs, rhs,
                                           ctx->lexer, start_ofs);