dataset: Fix memory leak destroying a dataset that has a permanent_dict.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2021 17:20:28 +0000 (10:20 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2021 17:20:28 +0000 (10:20 -0700)
Found by Address Sanitizer.

src/data/dataset.c

index 10005e0aca67968a72c12a45d4042104fc9ff327..4313cac8758aace9f07f214fd012179cd7664add 100644 (file)
@@ -198,6 +198,7 @@ dataset_destroy (struct dataset *ds)
       dataset_set_session (ds, NULL);
       dataset_clear (ds);
       dict_unref (ds->dict);
+      dict_unref (ds->permanent_dict);
       caseinit_destroy (ds->caseinit);
       trns_chain_destroy (ds->permanent_trns_chain);
       dataset_transformations_changed__ (ds, false);