Commit 9641f30f authored by Benjamin Schaaf's avatar Benjamin Schaaf Committed by Evangelos Ribeiro Tzaras
Browse files

Fix memory leak

parent 96d985e5
......@@ -424,6 +424,7 @@ mp_process_pipeline_process_image(MPImage image)
// If we haven't processed the previous frame yet, drop this one
if (frames_received != frames_processed && !is_capturing) {
printf("Dropped frame at capture\n");
free(image.data);
return;
}
......
......@@ -160,6 +160,7 @@ mp_zbar_pipeline_process_image(cairo_surface_t *surface)
{
// If we haven't processed the previous frame yet, drop this one
if (frames_received != frames_processed) {
cairo_surface_destroy(surface);
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment