mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
etnaviv: fix a null pointer dereference
This issue was found by cppcheck Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
74470baebb
commit
dc471f2ef8
1 changed files with 2 additions and 2 deletions
|
|
@ -238,11 +238,11 @@ out_unlock:
|
|||
/* destroy a buffer object */
|
||||
void etna_bo_del(struct etna_bo *bo)
|
||||
{
|
||||
struct etna_device *dev = bo->dev;
|
||||
|
||||
if (!bo)
|
||||
return;
|
||||
|
||||
struct etna_device *dev = bo->dev;
|
||||
|
||||
if (!p_atomic_dec_zero(&bo->refcnt))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue