Skip to content

Commit

Permalink
test: fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelP committed Aug 26, 2021
1 parent a47c35f commit 478f636
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/arvtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ arv_test_camera_add_result (ArvTestCamera *test_camera,
test_camera->results = g_slist_append (test_camera->results,
arv_test_result_new (title, test_camera->vendor_model,
status, comment));

g_clear_pointer (&title, g_free);
}

G_DEFINE_BOXED_TYPE (ArvTestCamera, arv_test_camera, arv_test_camera_copy, arv_test_camera_free)
Expand Down Expand Up @@ -826,7 +828,7 @@ arv_test_run (ArvTest *test, unsigned int n_iterations,

}

g_clear_pointer (&test_camera, g_free);
g_clear_pointer (&test_camera, arv_test_camera_free);
}
}
}
Expand Down

0 comments on commit 478f636

Please sign in to comment.