Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing dangling pointer to the kalman queue #323

Closed
sdalu opened this issue May 24, 2018 · 1 comment
Closed

Pushing dangling pointer to the kalman queue #323

sdalu opened this issue May 24, 2018 · 1 comment
Milestone

Comments

@sdalu
Copy link
Contributor

sdalu commented May 24, 2018

Reading the following code, it looks like a pointer to a local variable is pushed to the queue 馃槺

if ((options->combinedAnchorPositionOk || options->anchorPosition[current_anchor].timestamp) &&
(diff < (OUTLIER_TH*stddev))) {
distanceMeasurement_t dist;
dist.distance = options->distance[current_anchor];
dist.x = options->anchorPosition[current_anchor].x;
dist.y = options->anchorPosition[current_anchor].y;
dist.z = options->anchorPosition[current_anchor].z;
dist.stdDev = 0.25;
estimatorKalmanEnqueueDistance(&dist);
}

@krichardsson
Copy link
Contributor

When data is added to the queue it is coped, so it is not a problem. For more information take a look at https://www.freertos.org/a00117.html

Thanks for the heads up!

@krichardsson krichardsson added this to the next-version milestone Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants