From: John Darrington Date: Sat, 20 Jun 2020 05:17:06 +0000 (+0200) Subject: Fixed a use after free error when manipulating datasets. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d06ba6d498b9446d5fb8c432d24efb2bee713a9;p=pspp Fixed a use after free error when manipulating datasets. Reported by: Andrea Fioraldi Fixes bug: #58598 --- diff --git a/src/data/dataset.c b/src/data/dataset.c index b94a3675c6..12fc4a20fd 100644 --- a/src/data/dataset.c +++ b/src/data/dataset.c @@ -293,7 +293,7 @@ dataset_set_dict (struct dataset *ds, struct dictionary *dict) dataset_clear (ds); dict_unref (ds->dict); - ds->dict = dict; + ds->dict = dict_ref (dict); dict_set_change_callback (ds->dict, dict_callback, ds); }