projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1821e5
)
Fix Uninitialized variables pointed out by Coverity
author
Takuma Hoshiai
<takuma.hoshiai@gmail.com>
Mon, 9 Jan 2023 18:08:13 +0000
(
03:08
+0900)
committer
Takuma Hoshiai
<takuma.hoshiai@gmail.com>
Mon, 9 Jan 2023 18:08:13 +0000
(
03:08
+0900)
Fix Uninitialized variables pointed out by Coverity.
src/watchdog/wd_ping.c
patch
|
blob
|
blame
|
history
diff --git
a/src/watchdog/wd_ping.c
b/src/watchdog/wd_ping.c
index 89bbe0b3f3f0b2b2a2783e6d6081257c873a1c94..9be1ddb3a2e610fa1fdf0fa88d94488d55732f1a 100644
(file)
--- a/
src/watchdog/wd_ping.c
+++ b/
src/watchdog/wd_ping.c
@@
-231,10
+231,13
@@
wd_trusted_server_command(char *hostname)
dup2(fd, 2);
close(fd);
- if (strlen(exec_cmd->data)
!
= 0)
+ if (strlen(exec_cmd->data)
=
= 0)
{
- status = system(exec_cmd->data);
+ pfree(exec_cmd->data);
+ exit(EXIT_FAILURE);
}
+
+ status = system(exec_cmd->data);
pfree(exec_cmd->data);
if (WIFEXITED(status) == 0 || WEXITSTATUS(status) != 0)