Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > b3bd92884018251b87f9099340c300c3 > files > 4

ltrace-0.5-13.45svn.el5_7.12.src.rpm

diff -up ltrace-0.5/breakpoints.c\~ ltrace-0.5/breakpoints.c
--- ltrace-0.5/breakpoints.c~	2011-07-28 16:28:07.977750619 +0200
+++ ltrace-0.5/breakpoints.c	2011-07-28 16:32:50.741074523 +0200
@@ -146,6 +146,19 @@ void breakpoints_init(struct process *pr
 		proc->breakpoints = NULL;
 	}
 
+	proc->breakpoints = dict_init(dict_key2hash_int,
+				      dict_key_cmp_int);
+
+	if (proc->list_of_symbols != NULL) {
+		struct library_symbol * sym = proc->list_of_symbols;
+		while (sym != NULL) {
+			struct library_symbol * next = sym->next;
+			free(sym);
+			sym = next;
+		}
+	}
+	proc->list_of_symbols = NULL;
+
 	if (opt_L && proc->filename) {
 		proc->list_of_symbols = read_elf(proc);
 		if (opt_e) {
@@ -167,8 +180,6 @@ void breakpoints_init(struct process *pr
 				}
 			}
 		}
-	} else {
-		proc->list_of_symbols = NULL;
 	}
 	for (sym = proc->list_of_symbols; sym; sym = sym->next) {
 		/* proc->pid==0 delays enabling. */

Diff finished.  Thu Jul 28 16:33:08 2011