Categoricals.c: Call payload->destroy inside categoricals_done
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 3 Mar 2012 10:49:22 +0000 (11:49 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 3 Mar 2012 10:49:22 +0000 (11:49 +0100)
src/math/categoricals.c

index d4d43243703cd30dd2a848f7f56bf148b8ffc5b8..5aeb7e213c6d564f95f424321e42a9ace4b91112 100644 (file)
@@ -575,6 +575,8 @@ categoricals_done (const struct categoricals *cat_)
              const double bin = categoricals_get_code_for_case (cat, x, iv->ccase); \
              iap->enc_sum [x - iap->base_subscript_short] += bin * iv->cc;
            }
+         if (cat->payload && cat->payload->destroy)
+           cat->payload->destroy (cat->aux1, cat->aux2, iv->user_data);
        }
     }