]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Only read $HOME/.valgrindrc if HOME is actually set.
authorJulian Seward <jseward@acm.org>
Wed, 6 Dec 2006 17:38:32 +0000 (17:38 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 6 Dec 2006 17:38:32 +0000 (17:38 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6380

coregrind/m_commandline.c

index 335c4e3d1e1d170061777da3413e9bb45956e4c1..74d9b9f25948c81b3bf804304ecaa710942811fe 100644 (file)
@@ -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(".");