git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd3c89c
)
telemetry: close socket on connection failure
author
Ciara Power
<ciara.power@intel.com>
Tue, 12 May 2020 15:29:00 +0000
(16:29 +0100)
committer
Thomas Monjalon
<thomas@monjalon.net>
Tue, 19 May 2020 13:05:56 +0000
(15:05 +0200)
The socket fd is now being closed when the connection fails.
Coverity issue: 358444
Fixes:
b80fe1805eee
("telemetry: introduce backward compatibility")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
lib/librte_telemetry/telemetry_legacy.c
patch
|
blob
|
history
diff --git
a/lib/librte_telemetry/telemetry_legacy.c
b/lib/librte_telemetry/telemetry_legacy.c
index
10b575a
..
72471cb
100644
(file)
--- a/
lib/librte_telemetry/telemetry_legacy.c
+++ b/
lib/librte_telemetry/telemetry_legacy.c
@@
-100,6
+100,7
@@
register_client(const char *cmd __rte_unused, const char *params,
if (connect(fd, (struct sockaddr *)&addrs, sizeof(addrs)) == -1) {
perror("\nClient connection error\n");
+ close(fd);
return -1;
}
pthread_create(&th, NULL, &legacy_client_handler,