about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-27 10:07:32 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-27 10:07:32 -0400
commit8b28aa9c94e7c6179d70fe73afcd3fff29809d61 (patch)
tree0d285f565fbd1b6f7f2121be5095bba4e644b10f /src
parentf419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da (diff)
downloadmusl-8b28aa9c94e7c6179d70fe73afcd3fff29809d61.tar.gz
musl-8b28aa9c94e7c6179d70fe73afcd3fff29809d61.tar.xz
musl-8b28aa9c94e7c6179d70fe73afcd3fff29809d61.zip
fix bug caused by main app & libc having map set; cannot free them
Diffstat (limited to 'src')
-rw-r--r--src/ldso/dynlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index b8c26ace..93a4b44c 100644
--- a/src/ldso/dynlink.c
+++ b/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;
 	}
 }