From: Julian Seward Date: Wed, 6 Dec 2006 17:38:32 +0000 (+0000) Subject: Only read $HOME/.valgrindrc if HOME is actually set. X-Git-Tag: svn/VALGRIND_3_3_0~505 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abce15a7991f6270c5465f055490ed525668a41f;p=thirdparty%2Fvalgrind.git Only read $HOME/.valgrindrc if HOME is actually set. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6380 --- diff --git a/coregrind/m_commandline.c b/coregrind/m_commandline.c index 335c4e3d1e..74d9b9f259 100644 --- a/coregrind/m_commandline.c +++ b/coregrind/m_commandline.c @@ -208,7 +208,8 @@ void VG_(split_up_argv)( Int argc, HChar** argv ) // read_dot_valgrindrc() allocates the return value with // VG_(malloc)(). We do not free f1_clo and f2_clo as they get // put into VG_(args_for_valgrind) and so must persist. - HChar* f1_clo = read_dot_valgrindrc( VG_(getenv)("HOME") ); + HChar* home = VG_(getenv)("HOME"); + HChar* f1_clo = home ? read_dot_valgrindrc( home ) : NULL; HChar* env_clo = VG_(strdup)( VG_(getenv)(VALGRIND_OPTS) ); HChar* f2_clo = read_dot_valgrindrc(".");