nullPointerRedundantCheck

This commit is contained in:
francescomani
2024-04-09 16:55:51 +02:00
parent ddf3b1614c
commit 8404da759f
28 changed files with 78 additions and 75 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ bool cu_add_f1_ue_data(uint32_t ue_id, const f1_ue_data_t *data)
return false;
}
f1_ue_data_t *idata = malloc(sizeof(*idata));
AssertFatal(idata != NULL, "cannot allocate memory\n");
AssertFatal(idata, "cannot allocate memory\n");
*idata = *data;
hashtable_rc_t ret = hashtable_insert(cu2du_ue_mapping, key, idata);
pthread_mutex_unlock(&cu2du_mutex);
@@ -116,7 +116,7 @@ bool du_add_f1_ue_data(uint32_t ue_id, const f1_ue_data_t *data)
return false;
}
f1_ue_data_t *idata = malloc(sizeof(*idata));
AssertFatal(idata != NULL, "cannot allocate memory\n");
AssertFatal(idata, "cannot allocate memory\n");
*idata = *data;
hashtable_rc_t ret = hashtable_insert(du2cu_ue_mapping, key, idata);
pthread_mutex_unlock(&du2cu_mutex);