chore: 防止多次释放
This commit is contained in:
parent
7771b8341c
commit
ffabfd41ea
@ -112,7 +112,7 @@ PHP_METHOD(WxworkFinanceSdk, __destruct)
|
|||||||
zval *this = getThis();
|
zval *this = getThis();
|
||||||
WeWorkFinanceSdk_t *wecom_sdk = wxwork_finance_internal_get_sdk(this);
|
WeWorkFinanceSdk_t *wecom_sdk = wxwork_finance_internal_get_sdk(this);
|
||||||
DestroySdk(wecom_sdk);
|
DestroySdk(wecom_sdk);
|
||||||
TRACE("release wecom_sdk");
|
//TRACE("release wecom_sdk");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -145,6 +145,7 @@ PHP_METHOD(WxworkFinanceSdk, getChatData)
|
|||||||
|
|
||||||
int ret = GetChatData(wecom_sdk, (int)seq, (int)limit, Z_STRVAL_P(proxy_host_zval), Z_STRVAL_P(proxy_password_zval), zval_get_long(timeout_zval), chat_data);
|
int ret = GetChatData(wecom_sdk, (int)seq, (int)limit, Z_STRVAL_P(proxy_host_zval), Z_STRVAL_P(proxy_password_zval), zval_get_long(timeout_zval), chat_data);
|
||||||
if (0 != ret) {
|
if (0 != ret) {
|
||||||
|
FreeSlice(chat_data);
|
||||||
zend_throw_exception(wxwork_finance_sdk_exception_ce, "Call WeWorkFinanceSdk_t GetChatData error", ret);
|
zend_throw_exception(wxwork_finance_sdk_exception_ce, "Call WeWorkFinanceSdk_t GetChatData error", ret);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user