Shutdown library properly on error.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-09-04 08:49:38 +02:00
parent dc0a55c8c0
commit 758ace0d1a
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 4 additions and 4 deletions

View File

@ -1882,8 +1882,8 @@ PH7_PRIVATE sxi32 PH7_VmMemoryError(
/* Consume the error message */ /* Consume the error message */
VmCallErrorHandler(&(*pVm), &sWorker); VmCallErrorHandler(&(*pVm), &sWorker);
} }
/* Release the VM gracefully and abort script execution */ /* Shutdown library and abort script execution */
PH7_VmRelease(pVm); ph7_lib_shutdown();
exit(255); exit(255);
} }
/* /*
@ -1964,8 +1964,8 @@ PH7_PRIVATE sxi32 PH7_VmGenericError(
rc = VmCallErrorHandler(&(*pVm), &sWorker); rc = VmCallErrorHandler(&(*pVm), &sWorker);
} }
if(iErr == PH7_CTX_ERR) { if(iErr == PH7_CTX_ERR) {
/* Release the VM gracefully and abort script execution */ /* Shutdown library and abort script execution */
PH7_VmRelease(pVm); ph7_lib_shutdown();
exit(255); exit(255);
} }
return rc; return rc;