Ver código fonte

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

Rich Felker 12 anos atrás
pai
commit
8b28aa9c94
1 arquivos alterados com 1 adições e 1 exclusões
  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;
 	}
 }