drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create()
virtio_gpu_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Link: http://patchwork.freedesktop.org/patch/msgid/1633770560-11658-1-git-send-email-jingxiangfeng@huawei.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
914b6f290b
commit
a63f393dd7
@ -308,8 +308,10 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
virtio_gpu_fb = kzalloc(sizeof(*virtio_gpu_fb), GFP_KERNEL);
|
||||
if (virtio_gpu_fb == NULL)
|
||||
if (virtio_gpu_fb == NULL) {
|
||||
drm_gem_object_put(obj);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj);
|
||||
if (ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user