projects
/
platform
/
upstream
/
iotivity.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6186e1
)
Close fd after use in RestInput
author
Satya Prakash Gupta
<sp.gupta@samsung.com>
Thu, 18 Jun 2015 08:48:40 +0000
(14:18 +0530)
committer
Erich Keane
<erich.keane@intel.com>
Mon, 22 Jun 2015 20:37:22 +0000
(20:37 +0000)
A socket descriptor being created in loop and not closed after use.
Change-Id: Iadf195c4bb4591bcfd124e89a08964660bc64103
Signed-off-by: Satya Prakash Gupta <sp.gupta@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1339
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
examples/OICMiddle/RestInput.cpp
patch
|
blob
|
history
diff --git
a/examples/OICMiddle/RestInput.cpp
b/examples/OICMiddle/RestInput.cpp
index
b6e240f
..
9d5b7b8
100644
(file)
--- a/
examples/OICMiddle/RestInput.cpp
+++ b/
examples/OICMiddle/RestInput.cpp
@@
-81,6
+81,7
@@
void RestInput::startAccept(int &sockfd)
return;
}
int n = read(connfd, m_data, BUFLEN);
+ close(connfd);
if (n < 0) {
cerr << "Failed to read from socket" << endl;
return;