Commit f42aae2
media: platform: allegro-dvt: Fix possible memory leak in allocate_buffers_internal()
commit 0f51406 upstream.
The buffer in the loop should be released under the exception path,
otherwise there may be a memory leak here.
To mitigate this, free the buffer when allegro_alloc_buffer fails.
Fixes: f20387d ("media: allegro: add Allegro DVT video IP core driver")
Cc: <[email protected]>
Signed-off-by: Gaosheng Cui <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent e5fe36e commit f42aae2
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1510 | 1510 | | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | | - | |
| 1513 | + | |
| 1514 | + | |
1514 | 1515 | | |
| 1516 | + | |
1515 | 1517 | | |
1516 | 1518 | | |
1517 | 1519 | | |
| |||
0 commit comments