Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit a76d5f0

Browse files
mcrnicfacebook-github-bot
authored andcommitted
fix crash in AdminCommandconnection::TLSSensingCallback
Summary: Function was missing a return after handling an error which could lead to use after free Reviewed By: MohamedBassem Differential Revision: D17907011 fbshipit-source-id: fccfece467e27b987b733272c02fe9a8caf4925e
1 parent 440278b commit a76d5f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

logdevice/server/admincommands/CommandListener.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void AdminCommandConnection::TLSSensingCallback::getReadBuffer(
5252
if (rv != 1) {
5353
ld_critical("There is no 1 byte in the socket for TLS detection.");
5454
connection_.closeConnectionAndDestroyObject();
55+
return;
5556
}
5657

5758
ld_debug("read data is available for peeking");

0 commit comments

Comments
 (0)