From 8d01dfc72aeecb5209e17d7a5049cb6fd326241a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 2 Aug 2013 09:59:02 -0400 Subject: [PATCH] if map_library has allocated a buffer for phdrs, free it on success too this fixes an oversight in the previous commit. --- src/ldso/dynlink.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.25.1