summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2006-09-06 16:02:26 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2006-09-06 16:02:26 (GMT)
commitac16ec28908325919c5182c1c9f1f42a4ce07030 (patch) (side-by-side diff)
treea034762f0865555399f23fb129f88772c286550a
parente89bad1a6594fffde8578dd4dd6fecb4c78d1056 (diff)
downloadcflow-ac16ec28908325919c5182c1c9f1f42a4ce07030.tar.gz
cflow-ac16ec28908325919c5182c1c9f1f42a4ce07030.tar.bz2
(delete_symbol): Do not free referenced symbols.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/symbol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/symbol.c b/src/symbol.c
index c31a323..e37be06 100644
--- a/src/symbol.c
+++ b/src/symbol.c
@@ -107,7 +107,11 @@ unlink_symbol(struct table_entry *tp)
static void
delete_symbol(struct table_entry *tp)
{
- free(unlink_symbol(tp));
+ Symbol *s = unlink_symbol(tp);
+ /* The symbol could have been referenced even if it is static
+ in -i^s mode. See tests/static.at for details. */
+ if (s->ref_line == NULL)
+ free(s);
}
static void cleanup_symbol_refs(Symbol *sym);

Return to:

Send suggestions and report system problems to the System administrator.