Fix svace issues 08/279908/1
authorCheoleun Moon <chleun.moon@samsung.com>
Tue, 24 Aug 2021 07:43:31 +0000 (16:43 +0900)
committerAnjali Nijhara <a.nijhara@samsung.com>
Thu, 18 Aug 2022 05:49:00 +0000 (11:19 +0530)
Change-Id: I963d56b8afc22e8de3a04aa2af6e401d5d7d84ef
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
src/dns-sd/dns-sd.c

index 4e644f2a92ea34cb3587bc4a654678707afbdf98..9fec026975c6daee5f1bd4a25bfa215a775664ee 100644 (file)
@@ -2127,6 +2127,7 @@ EXPORT_API int dnssd_destroy_remote_service(dnssd_service_h dnssd_service)
        remote_handle = __dnssd_get_struct_from_handle(dnssd_service);
        if (remote_handle == NULL) {
                DNSSD_LOGD("Service Handler not found");
+               DNSSD_UNLOCK;
                __DNSSD_LOG_FUNC_EXIT__;
                return DNSSD_ERROR_SERVICE_NOT_FOUND;
        }
@@ -2143,11 +2144,6 @@ EXPORT_API int dnssd_destroy_remote_service(dnssd_service_h dnssd_service)
        dnssd_handle_list = g_slist_remove(dnssd_handle_list, remote_handle);
        g_free(remote_handle->service_type);
        dnssd_found_data_s *found = GET_FOUND_DATA_P(remote_handle);
-       if (!found) {
-               DNSSD_LOGE("Cannot find found data.");
-               DNSSD_UNLOCK;
-               return DNSSD_ERROR_INVALID_PARAMETER;
-       }
 
        if (remote_handle->watch_id > 0)
                __remove_service_getaddrinfo_socket(remote_handle);