From: Rich Felker Date: Fri, 2 Aug 2013 13:59:02 +0000 (-0400) Subject: if map_library has allocated a buffer for phdrs, free it on success too X-Git-Tag: v0.9.13~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d01dfc72aeecb5209e17d7a5049cb6fd326241a;p=oweals%2Fmusl.git if map_library has allocated a buffer for phdrs, free it on success too this fixes an oversight in the previous commit. --- diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 0ae7177f..ff99489a 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -421,6 +421,7 @@ static void *map_library(int fd, struct dso *dso) dso->base = base; dso->dynv = (void *)(base+dyn); if (dso->tls_size) dso->tls_image = (void *)(base+tls_image); + free(allocated_buf); return map; noexec: errno = ENOEXEC;