Change #264176
| Category | ffmpeg |
| Changed by | Alexandru Ardelean <aardelean@deviqon.com> |
| Changed at | Fri 10 Apr 2026 18:02:28 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 24adcf3a72d88e1b38360678e3331eeb6de6849c |
Comments
avdevice/v4l2: fix potential memleak when allocating device buffers In the loop which allocates the buffers for a V4L2 device, if failure occurs for a certain buffer (e.g. 3rd of 4 buffers), then the previously allocated buffers (and the buffer array) would not be free'd in the mmap_init(). This would cause a leak. This change handles the error cases of that loop to free all allocated resources, so that when mmap_init() fails nothing is leaked. Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Changed files
- libavdevice/v4l2.c