From 1181062126ed5daf104aa9f7beb847055c1d4adc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 20:03:14 +0000 Subject: Update. 2001-09-08 Ulrich Drepper * elf/dl-object.c: Avoid allocating extra memory block for name. * elf/dl-close.c (_dl_close): Don't free l_libname if it is no allocated separately. * elf/dl-load.c (_dl_map_object_from_fd): Likewise. --- elf/dl-load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elf/dl-load.c') diff --git a/elf/dl-load.c b/elf/dl-load.c index cf05ad0dc8..48c78c32df 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1099,7 +1099,8 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, /* We are not supposed to load this object. Free all resources. */ __munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start); - free (l->l_libname); + if (!l->l_libname->dont_free) + free (l->l_libname); if (l->l_phdr_allocated) free ((void *) l->l_phdr); -- cgit v1.2.3