diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-08-02 09:59:02 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-08-02 09:59:02 -0400 |
commit | 8d01dfc72aeecb5209e17d7a5049cb6fd326241a (patch) | |
tree | c82482d53afbb1f847e476c08aba16de2324cf14 /src | |
parent | d5884a574cf156c8346e84b495b5cb29bbbd2d1a (diff) | |
download | musl-8d01dfc72aeecb5209e17d7a5049cb6fd326241a.tar.gz musl-8d01dfc72aeecb5209e17d7a5049cb6fd326241a.tar.xz musl-8d01dfc72aeecb5209e17d7a5049cb6fd326241a.zip |
if map_library has allocated a buffer for phdrs, free it on success too
this fixes an oversight in the previous commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/ldso/dynlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |