d/wmr: Tidy variable tracking

This commit is contained in:
Jakob Bornecrantz 2021-11-20 13:29:24 +00:00
parent 733d463ec4
commit 16c75e7cc7

View file

@ -269,8 +269,15 @@ fail:
void
wmr_camera_free(struct wmr_camera *cam)
{
// Stop the camera.
wmr_camera_stop(cam);
// Tidy the variable tracking.
u_var_remove_root(cam);
u_sink_debug_destroy(&cam->debug_sinks[0]);
u_sink_debug_destroy(&cam->debug_sinks[1]);
if (cam->ctx != NULL) {
int i;