Browse Source

Fix error handling threadz legacy profiles

A Go redefinition error causes pprof to skip parsing profile mappings.
Raul Silvera 9 years ago
parent
commit
7d7ed67f71
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      profile/legacy_profile.go

+ 2
- 1
profile/legacy_profile.go View File

@@ -983,7 +983,8 @@ func parseAdditionalSections(l string, b *bytes.Buffer, p *Profile) (err error)
983 983
 			break
984 984
 		}
985 985
 		// Ignore any unrecognized sections.
986
-		if l, err := b.ReadString('\n'); err != nil {
986
+		var err error
987
+		if l, err = b.ReadString('\n'); err != nil {
987 988
 			if err != io.EOF {
988 989
 				return err
989 990
 			}