提交 a375bf56 编写于 作者: L Leon Chan

fix: close file when process interpretor failed

close: #I4ATQX
Signed-off-by: NLeon Chan <chenwei26@huawei.com>
上级 52d1d8d8
...@@ -544,8 +544,6 @@ STATIC INT32 OsLoadInterpBinary(ELFLoadInfo *loadInfo, UINTPTR *interpMapBase) ...@@ -544,8 +544,6 @@ STATIC INT32 OsLoadInterpBinary(ELFLoadInfo *loadInfo, UINTPTR *interpMapBase)
PRINT_ERR("%s[%d]\n", __FUNCTION__, __LINE__); PRINT_ERR("%s[%d]\n", __FUNCTION__, __LINE__);
} }
OsELFClose(loadInfo->interpInfo.procfd);
loadInfo->interpInfo.procfd = INVALID_FD;
return ret; return ret;
} }
...@@ -939,6 +937,8 @@ STATIC INT32 OsLoadELFSegment(ELFLoadInfo *loadInfo) ...@@ -939,6 +937,8 @@ STATIC INT32 OsLoadELFSegment(ELFLoadInfo *loadInfo)
if (loadInfo->interpInfo.procfd != INVALID_FD) { if (loadInfo->interpInfo.procfd != INVALID_FD) {
ret = OsLoadInterpBinary(loadInfo, &interpMapBase); ret = OsLoadInterpBinary(loadInfo, &interpMapBase);
OsELFClose(loadInfo->interpInfo.procfd);
loadInfo->interpInfo.procfd = INVALID_FD;
if (ret != LOS_OK) { if (ret != LOS_OK) {
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册