Followup to r8178: don't segfault if VG_(clo_log_name) is NULL.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8181
This commit is contained in:
Julian Seward 2008-06-04 09:07:36 +00:00
parent 9551b14c18
commit dfc08e58d2

View File

@ -854,7 +854,8 @@ static void print_preamble(Bool logging_to_fd, const char* toolname)
VG_(message)(Vg_UserMsg, "<pid>%d</pid>", VG_(getpid)());
VG_(message)(Vg_UserMsg, "<ppid>%d</ppid>", VG_(getppid)());
VG_(message)(Vg_UserMsg, "<tool>%t</tool>", toolname);
print_file_vars(VG_(clo_log_name));
if (VG_(clo_log_name))
print_file_vars(VG_(clo_log_name));
if (VG_(clo_xml_user_comment)) {
/* Note: the user comment itself is XML and is therefore to
be passed through verbatim (%s) rather than escaped