Skip to content

Commit

Permalink
canbus: fix pb field leak problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycool authored and yifeijiang committed Jul 11, 2018
1 parent 814107a commit 9d0e056
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/canbus/vehicle/lincoln/protocol/surround_73.cc
Expand Up @@ -68,6 +68,7 @@ void Surround73::Parse(const std::uint8_t *bytes, int32_t length,

// alternative representations.
const int8_t kSonarNumbers = 12;
chassis_detail->mutable_surround()->clear_sonar_range();
for (std::int8_t i = 0; i < kSonarNumbers; ++i) {
chassis_detail->mutable_surround()->add_sonar_range(
sonars(bytes, i, length / 2));
Expand Down

0 comments on commit 9d0e056

Please sign in to comment.