Fix null dereference in ListenUnix and ConnectUnix
This commit is contained in:
1 file changed
+6
@@ -161,6 +161,9 @@ class CSockManager : public TSocketManager<CZNCSock>,
|
||||
|
||||
bool ListenUnix(const CString& sSockName, const CString& sPath,
|
||||
CZNCSock* pcSock = nullptr) {
|
||||
if (!pcSock) {
|
||||
pcSock = GetSockObj("", 0);
|
||||
}
|
||||
if (pcSock->ListenUnixInternal(sPath)) {
|
||||
AddSock(pcSock, sSockName);
|
||||
return true;
|
||||
@@ -172,6 +175,9 @@ class CSockManager : public TSocketManager<CZNCSock>,
|
||||
|
||||
bool ConnectUnix(const CString& sSockName, const CString& sPath,
|
||||
CZNCSock* pcSock = nullptr) {
|
||||
if (!pcSock) {
|
||||
pcSock = GetSockObj("", 0);
|
||||
}
|
||||
if (pcSock->ConnectUnixInternal(sPath)) {
|
||||
AddSock(pcSock, sSockName);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user