mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
In link_elf_load_file(), when SPARSE_MAPPING is defined and we
cannot allocate ef->object, we freed ef before bailing out with an error. This is wrong because ef=lf and when we have an error and lf is non-NULL (which holds if we try to alloc ef->object), we free lf and thus ef as part of the bailing-out.
This commit is contained in:
parent
078b5daef7
commit
f5b07e11ad
2 changed files with 0 additions and 2 deletions
|
|
@ -671,7 +671,6 @@ link_elf_load_file(linker_class_t cls, const char* filename, linker_file_t* resu
|
|||
#ifdef SPARSE_MAPPING
|
||||
ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT);
|
||||
if (ef->object == NULL) {
|
||||
free(ef, M_LINKER);
|
||||
error = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -671,7 +671,6 @@ link_elf_load_file(linker_class_t cls, const char* filename, linker_file_t* resu
|
|||
#ifdef SPARSE_MAPPING
|
||||
ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT);
|
||||
if (ef->object == NULL) {
|
||||
free(ef, M_LINKER);
|
||||
error = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue