diff options
| author | Jianglei Nie <[email protected]> | 2022-07-05 17:43:06 +0800 |
|---|---|---|
| committer | Lyude Paul <[email protected]> | 2022-07-07 15:57:27 -0400 |
| commit | 6dc548745d5b5102e3c53dc5097296ac270b6c69 (patch) | |
| tree | aa30d9ae7fa44eefdc8ddf0269b50ab2a08b369c /tools/perf/scripts/python/bin | |
| parent | 540dfd188ea2940582841c1c220bd035a7db0e51 (diff) | |
drm/nouveau/nouveau_bo: fix potential memory leak in nouveau_bo_alloc()
nouveau_bo_alloc() allocates a memory chunk for "nvbo" with kzalloc().
When some error occurs, "nvbo" should be released. But when
WARN_ON(pi < 0)) equals true, the function return ERR_PTR without
releasing the "nvbo", which will lead to a memory leak.
We should release the "nvbo" with kfree() if WARN_ON(pi < 0)) equals true.
Signed-off-by: Jianglei Nie <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions