Subject: Fix handling command line option --xml-socket.
From: Ivo Raisr <[email-masked]>
Date: Thu, 3 Aug 2017 05:22:01 +0000 (+0000)

Fix handling command line option --xml-socket.
Fixes BZ#382998
Patch by: Orgad Shaneh <[email-masked]>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16467
---

diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index d66c67d..f6ba202 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -526,7 +526,7 @@ void VG_(init_log_xml_sinks)(VgLogTo log_to, VgLogTo xml_to,
          break;
 
       case VgLogTo_Socket:
-         log_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
+         xml_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
                                       &VG_(xml_output_sink), True);
          break;
    }