fix invalid read

This commit is contained in:
Hongze Cheng 2020-07-01 18:58:22 +08:00
parent 959389badf
commit 3afe4cc458
1 changed files with 7 additions and 4 deletions

View File

@ -6032,12 +6032,15 @@ void qDestroyQueryInfo(qinfo_t qHandle) {
qDebug("QInfo:%p dec refCount, value:%d", pQInfo, ref);
if (ref == 0) {
if (pQInfo->fn != NULL) {
assert(pQInfo->param != NULL);
pQInfo->fn(pQInfo->param);
}
_qinfo_free_fn_t fn = pQInfo->fn;
void* param = pQInfo->param;
doDestoryQueryInfo(pQInfo);
if (fn != NULL) {
assert(param != NULL);
fn(param);
}
}
}