Fix crash when not setting GCOV_PREFIX.

llvm-svn: 130834
This commit is contained in:
Nick Lewycky 2011-05-04 03:58:45 +00:00
parent 36d8f05211
commit 0e5667bc89
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static char *mangle_filename(const char *orig_filename) {
prefix = getenv("GCOV_PREFIX");
if (!prefix)
return strdup(filename);
return strdup(orig_filename);
filename = malloc(strlen(prefix) + 1 + strlen(orig_filename) + 1);
strcpy(filename, prefix);