]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a NULL pointer dereference issue spotted by IBM's BEAM checker.
authorFlorian Krohm <florian@eich-krohm.de>
Wed, 28 Sep 2011 17:43:44 +0000 (17:43 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Wed, 28 Sep 2011 17:43:44 +0000 (17:43 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12062

cachegrind/cg_merge.c

index 94cc347f1265e03c30b5e6f726ce10fec7eb79de..7917627cccd969563c92fe385b4b5434de34a09a 100644 (file)
@@ -937,7 +937,7 @@ int main ( int argc, char** argv )
       show_CacheProfFile( outfile, cpf );
       if (ferror(outfile)) {
          fprintf(stderr, "%s: error writing output file %s\n", 
-                         argv0, outfilename);
+                         argv0, outfilename ? outfilename : "(stdout)" );
          perror(argv0);
          if (outfile != stdout)
             fclose(outfile);