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

Commit

Permalink
fix crash in AdminCommandconnection::TLSSensingCallback
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcrnic authored and facebook-github-bot committed Oct 18, 2019
1 parent 440278b commit a76d5f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions logdevice/server/admincommands/CommandListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void AdminCommandConnection::TLSSensingCallback::getReadBuffer(
if (rv != 1) {
ld_critical("There is no 1 byte in the socket for TLS detection.");
connection_.closeConnectionAndDestroyObject();
return;
}

ld_debug("read data is available for peeking");
Expand Down

0 comments on commit a76d5f0

Please sign in to comment.