Do not compare an array with NULL pointer 99/257299/1 accepted/tizen/base/20210430.052635 submit/tizen_base/20210422.103907
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 22 Apr 2021 06:58:19 +0000 (15:58 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 22 Apr 2021 06:58:28 +0000 (15:58 +0900)
Change-Id: I88d5ab0d7262f6eaf4fcc637c788079f9fc5af32

lib/sendf.c

index 3611c73..718553f 100644 (file)
@@ -309,11 +309,9 @@ CURLcode Curl_write(struct connectdata *conn,
 
 #ifdef HAVE_TIZEN_DLP
   u_int32_t destination_ipv4 = 0;
-  if(conn->ip_addr_str != NULL) {
-    struct in_addr in;
-    if(Curl_inet_pton(AF_INET, conn->ip_addr_str, &in) == 1) {
-      destination_ipv4 = in.s_addr;
-    }
+  struct in_addr in;
+  if(Curl_inet_pton(AF_INET, conn->ip_addr_str, &in) == 1) {
+    destination_ipv4 = in.s_addr;
   }
 
   curl_extensions_dlp_check_leak(conn->host.dispname,