Scan build: Argument with 'nonnull' attribute passed null

This commit is contained in:
mir
2023-10-31 11:53:42 +01:00
parent 82597e7e8f
commit e0ff84f67c
4 changed files with 7 additions and 3 deletions
+2
View File
@@ -53,10 +53,12 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port)
char *address;
if (NETParams[1].strptr != NULL) {
LOG_I(GTPU, "SA mode \n");
AssertFatal(gnb_ipv4_address_for_NGU != NULL, "Undefined Behaviour");
address = strdup(gnb_ipv4_address_for_NGU);
*port = gnb_port_for_NGU;
} else {
LOG_I(GTPU, "NSA mode \n");
AssertFatal(gnb_ipv4_address_for_S1U != NULL, "Undefined Behaviour");
address = strdup(gnb_ipv4_address_for_S1U);
*port = gnb_port_for_S1U;
}