decrypt mirror exdata free 判空
This commit is contained in:
@@ -39,7 +39,10 @@ void policy_table_ex_data_dup_cb(int table_id, MAAT_PLUGIN_EX_DATA * to,
|
|||||||
void policy_table_ex_data_free_cb(int table_id, MAAT_PLUGIN_EX_DATA * ad, long argl, void * argp)
|
void policy_table_ex_data_free_cb(int table_id, MAAT_PLUGIN_EX_DATA * ad, long argl, void * argp)
|
||||||
{
|
{
|
||||||
struct policy_table_ex_data * ex_data = (struct policy_table_ex_data *)*ad;
|
struct policy_table_ex_data * ex_data = (struct policy_table_ex_data *)*ad;
|
||||||
policy_table_ex_data_free(ex_data);
|
if(ex_data)
|
||||||
|
{
|
||||||
|
policy_table_ex_data_free(ex_data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void policy_table_ex_data_new_cb(int table_id, const char * key, const char * table_line,
|
void policy_table_ex_data_new_cb(int table_id, const char * key, const char * table_line,
|
||||||
@@ -136,14 +139,24 @@ void profile_table_ex_data_dup_cb(int table_id, MAAT_PLUGIN_EX_DATA * to,
|
|||||||
MAAT_PLUGIN_EX_DATA * from, long argl, void * argp)
|
MAAT_PLUGIN_EX_DATA * from, long argl, void * argp)
|
||||||
{
|
{
|
||||||
struct profile_table_ex_data * ex_data = (struct profile_table_ex_data *)*from;
|
struct profile_table_ex_data * ex_data = (struct profile_table_ex_data *)*from;
|
||||||
__sync_add_and_fetch(&ex_data->atomic_refcnt, 1);
|
if(ex_data)
|
||||||
*to = (void *)ex_data;
|
{
|
||||||
|
__sync_add_and_fetch(&ex_data->atomic_refcnt, 1);
|
||||||
|
*to = (void *)ex_data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*to = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void profile_table_ex_data_free_cb(int table_id, MAAT_PLUGIN_EX_DATA * ad, long argl, void * argp)
|
void profile_table_ex_data_free_cb(int table_id, MAAT_PLUGIN_EX_DATA * ad, long argl, void * argp)
|
||||||
{
|
{
|
||||||
struct profile_table_ex_data * ex_data = (struct profile_table_ex_data *)*ad;
|
struct profile_table_ex_data * ex_data = (struct profile_table_ex_data *)*ad;
|
||||||
profile_table_ex_data_free(ex_data);
|
if(ex_data)
|
||||||
|
{
|
||||||
|
profile_table_ex_data_free(ex_data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void profile_table_ex_data_new_cb(int table_id, const char * key, const char * table_line,
|
void profile_table_ex_data_new_cb(int table_id, const char * key, const char * table_line,
|
||||||
|
|||||||
Reference in New Issue
Block a user