mirror of
https://github.com/netdata/netdata.git
synced 2025-04-28 22:52:30 +00:00
Fix coverity issues (#16873)
This commit is contained in:
parent
2fe3a6c21b
commit
5124aefc2b
1 changed files with 2 additions and 0 deletions
|
@ -300,6 +300,7 @@ static inline bool local_sockets_find_all_sockets_in_proc(LS_STATE *ls, const ch
|
||||||
pid_t pid = (pid_t)strtoul(proc_entry->d_name, NULL, 10);
|
pid_t pid = (pid_t)strtoul(proc_entry->d_name, NULL, 10);
|
||||||
if(!pid) {
|
if(!pid) {
|
||||||
local_sockets_log(ls, "cannot parse pid of '%s'", proc_entry->d_name);
|
local_sockets_log(ls, "cannot parse pid of '%s'", proc_entry->d_name);
|
||||||
|
closedir(fd_dir);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
net_ns_inode = 0;
|
net_ns_inode = 0;
|
||||||
|
@ -746,6 +747,7 @@ static inline bool local_sockets_get_namespace_sockets(LS_STATE *ls, struct pid_
|
||||||
int pipefd[2];
|
int pipefd[2];
|
||||||
if (pipe(pipefd) != 0) {
|
if (pipe(pipefd) != 0) {
|
||||||
local_sockets_log(ls, "cannot create pipe");
|
local_sockets_log(ls, "cannot create pipe");
|
||||||
|
close(fd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue