Browse Source

fix bug caused by main app & libc having map set; cannot free them

Rich Felker 12 years ago
parent
commit
8b28aa9c94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ldso/dynlink.c

+ 1 - 1
src/ldso/dynlink.c

@@ -572,7 +572,7 @@ static void free_all(struct dso *p)
 	struct dso *n;
 	while (p) {
 		n = p->next;
-		if (p->map) free(p);
+		if (p->map && p!=libc && p!=head) free(p);
 		p = n;
 	}
 }