浏览代码

if map_library has allocated a buffer for phdrs, free it on success too

this fixes an oversight in the previous commit.
Rich Felker 12 年之前
父节点
当前提交
8d01dfc72a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/ldso/dynlink.c

+ 1 - 0
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;