Fix memory leak
This commit is contained in:

committed by
Martijn Braam

parent
cfba98593c
commit
af641f2a63
@@ -424,6 +424,7 @@ mp_process_pipeline_process_image(MPImage image)
|
|||||||
// If we haven't processed the previous frame yet, drop this one
|
// If we haven't processed the previous frame yet, drop this one
|
||||||
if (frames_received != frames_processed && !is_capturing) {
|
if (frames_received != frames_processed && !is_capturing) {
|
||||||
printf("Dropped frame at capture\n");
|
printf("Dropped frame at capture\n");
|
||||||
|
free(image.data);
|
||||||
return;
|
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 we haven't processed the previous frame yet, drop this one
|
||||||
if (frames_received != frames_processed) {
|
if (frames_received != frames_processed) {
|
||||||
|
cairo_surface_destroy(surface);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user