Skip to content

Commit

Permalink
Tools: fixed valgrind errors with AP_Param::ParamToken
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Jan 25, 2021
1 parent 1716fcf commit 49e2a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/AP_Periph/can.cpp
Expand Up @@ -210,7 +210,7 @@ static void handle_param_getset(CanardInstance* ins, CanardRxTransfer* transfer)
strncpy((char *)name, (char *)req.name.data, req.name.len);
vp = AP_Param::find((char *)name, &ptype);
} else {
AP_Param::ParamToken token;
AP_Param::ParamToken token {};
vp = AP_Param::find_by_index(req.index, &ptype, &token);
if (vp != nullptr) {
vp->copy_name_token(token, (char *)name, AP_MAX_NAME_SIZE+1, true);
Expand Down

0 comments on commit 49e2a0c

Please sign in to comment.