/* PSPP - a program for statistical analysis.
- Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011, 2012, 2013, 2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
s->active = NULL;
HMAPX_FOR_EACH_SAFE (ds, node, next, &s->datasets)
- dataset_destroy (ds);
+ dataset_unref (ds);
+ hmapx_destroy (&s->datasets);
free (s->syntax_encoding);
free (s);
}
if (old == s->active)
s->active = ds;
if (old != NULL)
- session_remove_dataset (s, old);
+ {
+ session_remove_dataset (s, old);
+ dataset_destroy (old);
+ }
hmapx_insert (&s->datasets, ds,
utf8_hash_case_string (dataset_name (ds), 0));