Test Code: (Provided by Douglas)
v4l-dvb/v4l2-apps/test/stress-buffer.c
The audio DMA area was never being freed and would slowly leak over
time as the v4l device was opened and closed by an application.
Thanks again to Douglas for generating the test code to help locate
memory leaks!!!
Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
mutex_lock(&dev->lock);
dev->adev.users--;
em28xx_audio_analog_set(dev);
+ if (substream->runtime->dma_area) {
+ dprintk("freeing\n");
+ vfree(substream->runtime->dma_area);
+ substream->runtime->dma_area = NULL;
+ }
mutex_unlock(&dev->lock);
return 0;