bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cflow] seg. fault with 'cflow -ix^s ' options


From: Sergey Poznyakoff
Subject: Re: [Bug-cflow] seg. fault with 'cflow -ix^s ' options
Date: Wed, 06 Sep 2006 18:26:32 +0300

<address@hidden> wrote:

> Just to repport that the last GNU cflow (1.1) raises a segmentation fault 
> if used with following option on cflow 1.1 source code
> 
> cflow -ix^s cflow-1.1/src/*.c

Thank you.  Here is the patch:

Index: src/symbol.c
===================================================================
RCS file: /cvsroot/cflow/cflow/src/symbol.c,v
retrieving revision 1.17
diff -p -u -r1.17 symbol.c
--- src/symbol.c        15 Mar 2006 19:33:01 -0000      1.17
+++ src/symbol.c        6 Sep 2006 15:25:45 -0000
@@ -107,7 +107,9 @@ unlink_symbol(struct table_entry *tp)
 static void
 delete_symbol(struct table_entry *tp)
 {
-     free(unlink_symbol(tp));
+     Symbol *s = unlink_symbol(tp);
+     if (s->ref_line == NULL) /* Symbol is not referenced */
+         free(s);
 }     
 
 static void cleanup_symbol_refs(Symbol *sym);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]