projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac60513
)
Fixed memory leak
author
Jason Stover
<jhs@math.gcsu.edu>
Sat, 25 Mar 2006 22:46:21 +0000
(22:46 +0000)
committer
Jason Stover
<jhs@math.gcsu.edu>
Sat, 25 Mar 2006 22:46:21 +0000
(22:46 +0000)
src/data/category.c
patch
|
blob
|
history
diff --git
a/src/data/category.c
b/src/data/category.c
index 55d7ca8b05addbe392424f1114755d9e4629645d..509085497ab01fb39f6a6d0f5b4bce7f102a8984 100644
(file)
--- a/
src/data/category.c
+++ b/
src/data/category.c
@@
-59,9
+59,16
@@
void
cat_stored_values_destroy (struct variable *v)
{
assert (v != 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);
+ v->obs_vals = NULL;
}
}