projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix link error noted by Jason Stover.
[pspp]
/
src
/
data
/
category.c
diff --git
a/src/data/category.c
b/src/data/category.c
index e48987a043ded9bd16012145eb69bb7840149dc9..509085497ab01fb39f6a6d0f5b4bce7f102a8984 100644
(file)
--- a/
src/data/category.c
+++ b/
src/data/category.c
@@
-33,9
+33,8
@@
*/
#include <config.h>
#include <stdlib.h>
*/
#include <config.h>
#include <stdlib.h>
-#include <message.h>
-#include "alloc.h"
-#include "message.h"
+#include <libpspp/alloc.h>
+#include <libpspp/message.h>
#include "category.h"
#include "cat-routines.h"
#include <string.h>
#include "category.h"
#include "cat-routines.h"
#include <string.h>
@@
-60,9
+59,16
@@
void
cat_stored_values_destroy (struct variable *v)
{
assert (v != NULL);
cat_stored_values_destroy (struct variable *v)
{
assert (v != NULL);
+
if (v->obs_vals != NULL)
{
if (v->obs_vals != NULL)
{
+ if (v->obs_vals->n_allocated_categories > 0)
+ {
+ free (v->obs_vals->vals);
+ v->obs_vals->vals = NULL;
+ }
free (v->obs_vals);
free (v->obs_vals);
+ v->obs_vals = NULL;
}
}
}
}