diff options
author | midipix <writeonce@midipix.org> | 2018-06-05 08:46:50 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-06-05 08:46:50 -0400 |
commit | 80fd717092ea421d0b410e07b1962873227557bd (patch) | |
tree | 1bd5e18449b6e0efdd5c3946064ac6d1dd009b16 /src | |
parent | 65af99776ba44a1181d49a3905c828b207988d80 (diff) | |
download | pemagine-80fd717092ea421d0b410e07b1962873227557bd.tar.bz2 pemagine-80fd717092ea421d0b410e07b1962873227557bd.tar.xz |
ldso: runtime data block: support inheritance of an alternate loader handle.
Diffstat (limited to 'src')
-rw-r--r-- | src/ldso/pe_find_framework_loader.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ldso/pe_find_framework_loader.c b/src/ldso/pe_find_framework_loader.c index c138d32..10513c0 100644 --- a/src/ldso/pe_find_framework_loader.c +++ b/src/ldso/pe_find_framework_loader.c @@ -119,8 +119,12 @@ int32_t pe_find_framework_loader( OS_FILE_NON_DIRECTORY_FILE))) return status; + if (rtdata->hloader) + zw_close(hloader); + else + rtdata->hloader = hloader; + rtdata->hdsodir = hdsodir; - rtdata->hloader = hloader; rtdata->himage = himage; return OS_STATUS_SUCCESS; @@ -156,8 +160,12 @@ int32_t pe_find_framework_loader( OS_FILE_NON_DIRECTORY_FILE))) return status; + if (rtdata->hloader) + zw_close(hloader); + else + rtdata->hloader = hloader; + rtdata->hdsodir = 0; - rtdata->hloader = hloader; return OS_STATUS_SUCCESS; } @@ -261,8 +269,12 @@ int32_t pe_find_framework_loader( zw_close(hprevious); } + if (rtdata->hloader) + zw_close(hloader); + else + rtdata->hloader = hloader; + rtdata->hdsodir = 0; - rtdata->hloader = hloader; rtdata->himage = himage; rtdata->hroot = hparent; |