]> granicus.if.org Git - musl/commitdiff
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 b8c26ace57a650500e3db1582757213d2d199b87..93a4b44c1165035db3e2852e8db682cd9b664643 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;
        }
 }