Fix use-after-free errors.
[pspp] / src / output / spv / spv-legacy-decoder.c
index e103dd842e8247379cbfc670803c24bc9f3a8f83..84397a04ab3179bc80be903689b0477efb969cbd 100644 (file)
@@ -1893,10 +1893,10 @@ decode_spvdx_table (const struct spvdx_visualization *v, const char *subtype,
 
       if (!progress)
         {
-          free (nodes);
           error = xasprintf ("Table has %zu variables with circular or "
                              "unresolved references, including variable %s.",
                              n_nodes, nodes[0]->id);
+          free (nodes);
           goto exit;
         }
     }