if map_library has allocated a buffer for phdrs, free it on success too
authorRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 13:59:02 +0000 (09:59 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 13:59:02 +0000 (09:59 -0400)
this fixes an oversight in the previous commit.

src/ldso/dynlink.c

index 0ae7177f4425db1af2cada4ea7768c0c0319a2be..ff99489a207548ee133dfb49ffc2cc0bd5f9c1ff 100644 (file)
@@ -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;