[PATCH]handle matcher NULL pointer

This commit is contained in:
liuwentan
2023-06-20 17:34:46 +08:00
parent 8ad355d5d7
commit 7cb24d96f8
9 changed files with 48 additions and 25 deletions

View File

@@ -428,13 +428,23 @@ int maat_get_table_id(struct maat *maat_inst, const char *table_name)
return table_id;
}
static inline void maat_runtime_ref_inc(struct maat_runtime *maat_rt, int thread_id)
static inline void maat_runtime_ref_inc(struct maat_runtime *maat_rt,
int thread_id)
{
if (NULL == maat_rt) {
return;
}
alignment_int64_array_add(maat_rt->ref_cnt, thread_id, 1);
}
static inline void maat_runtime_ref_dec(struct maat_runtime *maat_rt, int thread_id)
static inline void maat_runtime_ref_dec(struct maat_runtime *maat_rt,
int thread_id)
{
if (NULL == maat_rt) {
return;
}
alignment_int64_array_add(maat_rt->ref_cnt, thread_id, -1);
}