Skip to content

Commit

Permalink
fix a l2cap socket leak
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Dec 9, 2021
1 parent 94e1a26 commit 068b73e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BluetoothHciSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ int BluetoothHciSocket::kernelDisconnectWorkArounds(int length, char* data) {
return -3;
}
}
close(l2socket);

return 0;
return 0;
}

void BluetoothHciSocket::setConnectionParameters(
Expand Down Expand Up @@ -487,6 +488,7 @@ bool BluetoothHciSocket::kernelConnectWorkArounds(char* data, int length)
close(l2socket);
return false;
}
close(l2socket);

return true;
}
Expand Down

0 comments on commit 068b73e

Please sign in to comment.