panfrost- Avoid double free by deleting GEM handle in create_bo failure

path (Boris)
 
 Cc: Boris Brezillon <boris.brezillon@collabora.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEfxcpfMSgdnQMs+QqlvcN/ahKBwoFAl0dRFUACgkQlvcN/ahK
 Bwokcwf/aNT6EGTUsQZK1AHzoA6YN7o5Hgpng0Ut/Co67DN2QKj6FKGQxQKQ+uMf
 a/pKufg1yHUOd+lJm/MgJl1fAy0mqDv75LAO1askAusWqGZulRcpEbUwMmYs02v5
 xt1nHpPB7rvLCQsUK0vurX9E4HJ7VsHiaeDcWXRybc7XKxdafJVDPxOyzk+z3fpK
 ZxaRj8SjlWTS0NREcAPaPJQWhbr1Uf+FaNQuqnX/p7bHXtavq4SqouW42DM0bx7D
 sbGLEtvB/iusozOwQ6aXzRWdeCX7haYPPprJn78dlDJof1A9TU9cmLOgqtq9EHEL
 4yorb/aj3aDgsnmqC4BBZ17fnq6axw==
 =EjV2
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2019-07-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

panfrost- Avoid double free by deleting GEM handle in create_bo failure
          path (Boris)

Cc: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20190704001302.GA260390@art_vandelay
This commit is contained in:
Dave Airlie 2019-07-04 11:17:44 +10:00
commit a956c56b6a
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ static int panfrost_ioctl_create_bo(struct drm_device *dev, void *data,
return 0;
err_free:
drm_gem_object_put_unlocked(&shmem->base);
drm_gem_handle_delete(file, args->handle);
return ret;
}