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:
1255b66
)
Memory leak patrol.
author
John Darrington
<john@darrington.wattle.id.au>
Sun, 8 Oct 2006 01:49:15 +0000
(
01:49
+0000)
committer
John Darrington
<john@darrington.wattle.id.au>
Sun, 8 Oct 2006 01:49:15 +0000
(
01:49
+0000)
src/language/stats/ChangeLog
patch
|
blob
|
history
src/language/stats/rank.q
patch
|
blob
|
history
src/output/ChangeLog
patch
|
blob
|
history
src/output/html.c
patch
|
blob
|
history
src/output/table.c
patch
|
blob
|
history
diff --git
a/src/language/stats/ChangeLog
b/src/language/stats/ChangeLog
index 9d45ca7bce56116dec3f0d47fdf0650031e66bbc..c96b2861b7e9b458cd915cbd54148c627c9a0528 100644
(file)
--- a/
src/language/stats/ChangeLog
+++ b/
src/language/stats/ChangeLog
@@
-1,3
+1,8
@@
+Sun Oct 8 09:45:40 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+ * rank.q: Plugged a small memory leak which occurred under error
+ conditions.
+
Sat Oct 7 11:06:01 WST 2006 John Darrington <john@darrington.wattle.id.au>
* rank.q: Implemented most of the RANK command.
Sat Oct 7 11:06:01 WST 2006 John Darrington <john@darrington.wattle.id.au>
* rank.q: Implemented most of the RANK command.
diff --git
a/src/language/stats/rank.q
b/src/language/stats/rank.q
index c102d195c08c3b09227f6fe6864c362f90fd4ea0..59846c85bf20f27903bb280a87a0ae769db55163 100644
(file)
--- a/
src/language/stats/rank.q
+++ b/
src/language/stats/rank.q
@@
-264,7
+264,8
@@
rank_cmd (const struct sort_criteria *sc,
/* Obtain active file in CF. */
if (!procedure (NULL, NULL))
/* Obtain active file in CF. */
if (!procedure (NULL, NULL))
- return false;
+ goto error;
+
cf = proc_capture_output ();
/* Sort CF into SORTED_CF. */
cf = proc_capture_output ();
/* Sort CF into SORTED_CF. */
@@
-285,9
+286,13
@@
rank_cmd (const struct sort_criteria *sc,
proc_set_source (storage_source_create (out));
}
proc_set_source (storage_source_create (out));
}
- free (criteria.crits);
+ free (criteria.crits);
return result ;
return result ;
+
+error:
+ free (criteria.crits);
+ return false ;
}
/* Hardly a rank function !! */
}
/* Hardly a rank function !! */
diff --git
a/src/output/ChangeLog
b/src/output/ChangeLog
index b7e72cc74cc01c5a800879a88e723056a15f5025..60fd5761d31ea798590db62ef6af97c3a5cfd279 100644
(file)
--- a/
src/output/ChangeLog
+++ b/
src/output/ChangeLog
@@
-1,3
+1,10
@@
+Sun Oct 8 07:09:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+ * table.c (tab_destroy): Freed title, since this is not allocated
+ from the pool.
+
+ * html.c (html_open_driver): Freed chart_file_name.
+
Wed Jul 12 21:03:37 2006 Ben Pfaff <blp@gnu.org>
* table.c (tab_natural_width): Get rid of warning on empty column,
Wed Jul 12 21:03:37 2006 Ben Pfaff <blp@gnu.org>
* table.c (tab_natural_width): Get rid of warning on empty column,
diff --git
a/src/output/html.c
b/src/output/html.c
index 021200bc9749125437631b9b07fd6ee095c86825..72ca57d9227a5757ed18c06893f840afa72762af 100644
(file)
--- a/
src/output/html.c
+++ b/
src/output/html.c
@@
-87,10
+87,12
@@
html_open_driver (struct outp_driver *this, struct substring options)
fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", x->file);
print_title_tag (x->file, "H1", outp_title);
print_title_tag (x->file, "H2", outp_subtitle);
fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", x->file);
print_title_tag (x->file, "H1", outp_title);
print_title_tag (x->file, "H2", outp_subtitle);
+ free (x->chart_file_name);
return true;
error:
return true;
error:
+ free (x->chart_file_name);
this->class->close_driver (this);
return false;
}
this->class->close_driver (this);
return false;
}
diff --git
a/src/output/table.c
b/src/output/table.c
index 8d5ed12b2155bd42214a4827efddd1cfce2c7db1..a7dc4817f0f946a46fc73ce0f2713490810bbc5b 100644
(file)
--- a/
src/output/table.c
+++ b/
src/output/table.c
@@
-87,6
+87,7
@@
void
tab_destroy (struct tab_table *t)
{
assert (t != NULL);
tab_destroy (struct tab_table *t)
{
assert (t != NULL);
+ free (t->title);
pool_destroy (t->container);
}
pool_destroy (t->container);
}