mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 22:10:13 +00:00
elf: Call free from base namespace on error in dl-libc.c [BZ #27646]
In dlerror_run, free corresponds to the local malloc in the namespace, but GLRO (dl_catch_error) uses the malloc from the base namespace. elf/tst-dlmopen-gethostbyname triggers this mismatch, but it does not crash, presumably because of a fastbin deallocation. Fixes commitc2059edce2
("elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]") and commitb2964eb1d9
("dlfcn: Failures after dlmopen should not terminate process [BZ #24772]").
This commit is contained in:
parent
c8935581de
commit
832f50be6c
@ -48,7 +48,7 @@ dlerror_run (void (*operate) (void *), void *args)
|
||||
?: last_errstring != NULL);
|
||||
|
||||
if (result && malloced)
|
||||
free ((char *) last_errstring);
|
||||
GLRO (dl_error_free) ((char *) last_errstring);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user