fix bug caused by main app & libc having map set; cannot free them
authorRich Felker <dalias@aerifal.cx>
Mon, 27 Aug 2012 14:07:32 +0000 (10:07 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 27 Aug 2012 14:07:32 +0000 (10:07 -0400)
src/ldso/dynlink.c

index b8c26ac..93a4b44 100644 (file)
@@ -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;
        }
 }