[WGID-372659] reassign fd after using close() 95/205595/2 accepted/tizen/unified/20190508.234033 submit/tizen/20190508.040407
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 May 2019 01:45:10 +0000 (10:45 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 May 2019 01:50:43 +0000 (10:50 +0900)
Change-Id: I45081480991bf144dac2a2945e3e898e0b0856fa

packaging/download-provider.spec
provider/download-provider-client-manager.c

index 3b4cf15..04adbd3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.1.112
+Version:    2.1.113
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index 2e8ee5b..ac9b64b 100755 (executable)
@@ -407,8 +407,10 @@ static int __dp_client_new(int clientfd, dp_client_slots_fmt *clients,
                                        if (clients[i].client.channel >= 0 &&
                                                        clients[i].client.channel != clientfd) {
                                                dp_ipc_socket_free(clients[i].client.channel);
-                                               if (clients[i].client.notify >= 0)
+                                               if (clients[i].client.notify >= 0) {
                                                        close(clients[i].client.notify);
+                                                       clients[i].client.notify = -1;
+                                               }
                                                dp_notify_deinit(clients[i].credential.pid);
                                        }
                                        errorcode = __dp_client_run(clientfd, &clients[i], credential);