|
From: <sv...@va...> - 2011-09-28 17:48:30
|
Author: florian
Date: 2011-09-28 18:43:44 +0100 (Wed, 28 Sep 2011)
New Revision: 12062
Log:
Fix a NULL pointer dereference issue spotted by IBM's BEAM checker.
Modified:
trunk/cachegrind/cg_merge.c
Modified: trunk/cachegrind/cg_merge.c
===================================================================
--- trunk/cachegrind/cg_merge.c 2011-09-27 11:54:01 UTC (rev 12061)
+++ trunk/cachegrind/cg_merge.c 2011-09-28 17:43:44 UTC (rev 12062)
@@ -937,7 +937,7 @@
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);
|