Fix svace issue 19/305219/1 accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen/unified/20240202.165954 accepted/tizen/unified/toolchain/20240311.065629 accepted/tizen/unified/x/20240205.064010
authorWootak Jung <wootak.jung@samsung.com>
Tue, 30 Jan 2024 06:03:24 +0000 (15:03 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 30 Jan 2024 06:03:24 +0000 (15:03 +0900)
Change-Id: I18b0585ef7dda8977e43a2b34e1f49237b2c67ad
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/ps_service.c

index ace35c9..8c03a96 100644 (file)
@@ -56,6 +56,8 @@ static guint __ps_service_convert_ipv4_address_int(char *ip_address)
        temp_address = g_strdup_printf("%02x%02x%02x%02x", atoi(temp_str[0]), atoi(temp_str[1]), atoi(temp_str[2]), atoi(temp_str[3]));
        /* Free resources */
        g_strfreev(temp_str);
+       if (!temp_address)
+               return 0;
 
        address = strtoul(temp_address, (char **)NULL, HEX_ENCODING_VALUE);
        g_free(temp_address);