diff --git a/proof/proofx/src/TXProofMgr.cxx b/proof/proofx/src/TXProofMgr.cxx
index e2bc8851ec9602e37383a004fc8950605caa5797..8b862163e45245944514e96db115eb9f7f8685fb 100644
--- a/proof/proofx/src/TXProofMgr.cxx
+++ b/proof/proofx/src/TXProofMgr.cxx
@@ -79,6 +79,7 @@ Int_t TXProofMgr::Init(Int_t)
    // even when it matches the default value
    TString u = fUrl.GetUrl(kTRUE);
 
+   fSocket = 0;
    if (!(fSocket = new TXSocket(u, 'C', kPROOF_Protocol,
                                 kXPROOF_Protocol, 0, -1, this)) ||
        !(fSocket->IsValid())) {