projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbe93d8
)
Fix resource leak in hearbeat receiver process.
author
Tatsuo Ishii
<ishii@postgresql.org>
Sat, 14 Jun 2025 07:15:59 +0000
(16:15 +0900)
committer
Tatsuo Ishii
<ishii@postgresql.org>
Sat, 14 Jun 2025 07:15:59 +0000
(16:15 +0900)
Pointed out by Coverity.
Backpatch-through: v4.6
src/watchdog/wd_heartbeat.c
patch
|
blob
|
blame
|
history
diff --git
a/src/watchdog/wd_heartbeat.c
b/src/watchdog/wd_heartbeat.c
index 561cdfccf2d4c13046810136184920764da17f85..28a01d290d9e5d15e169660b1f6fd3a53aa084d6 100644
(file)
--- a/
src/watchdog/wd_heartbeat.c
+++ b/
src/watchdog/wd_heartbeat.c
@@
-357,6
+357,7
@@
wd_create_hb_recv_socket(WdHbIf * hb_if)
ereport(LOG,
(errmsg("failed to create watchdog heartbeat receive socket."),
errdetail("setsockopt(SO_BINDTODEVICE) requires root privilege")));
+ close(sock);
continue;
}
}
@@
-364,6
+365,7
@@
wd_create_hb_recv_socket(WdHbIf * hb_if)
ereport(LOG,
(errmsg("failed to create watchdog heartbeat receive socket"),
errdetail("setsockopt(SO_BINDTODEVICE) is not available on this platform")));
+ close(sock);
continue;
#endif
}