Fix memory leaks in ONEWAY command
[pspp] / src / math / categoricals.c
index 7eaf82195badf8dab7e63914cff3934cd6e3d68c..43edd048dc5324a8306133453096a0d079625708 100644 (file)
@@ -253,10 +253,8 @@ categoricals_destroy (struct categoricals *cat)
       /* Interate over each interaction value, and unref any cases that we reffed */
       HMAP_FOR_EACH (iv, struct interaction_value, node, &cat->iap[i].ivmap)
        {
-#if 0
-         if (cat->payload)
+         if (cat->payload && cat->payload->destroy)
            cat->payload->destroy (cat->aux1, iv->user_data);
-#endif
          case_unref (iv->ccase);
        }