projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5b4117
)
iptables: A file descriptor cannot be a nagative integer
author
Danny Jeongseok Seo
<s.seo@samsung.com>
Tue, 13 Nov 2012 01:44:26 +0000
(10:44 +0900)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Tue, 13 Nov 2012 12:38:27 +0000
(14:38 +0200)
When a socket() has failed and a negative file descriptor has been set,
close() cannot accept a negative number as a parameter.
src/iptables.c
patch
|
blob
|
history
diff --git
a/src/iptables.c
b/src/iptables.c
index
147d604
..
16b665a
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-1207,7
+1207,8
@@
static void table_cleanup(struct connman_iptables *table)
if (table == NULL)
return;
- close(table->ipt_sock);
+ if (table->ipt_sock >= 0)
+ close(table->ipt_sock);
for (list = table->entries; list; list = list->next) {
entry = list->data;