[PATCH 1/2] drm: Fix memory leak at error path of drm_read()
Takashi Iwai
tiwai at suse.de
Thu Dec 4 02:56:42 PST 2014
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
drivers/gpu/drm/drm_fops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index ed7bc68f7e87..a82dc28d54f3 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -525,6 +525,7 @@ ssize_t drm_read(struct file *filp, char __user *buffer,
if (copy_to_user(buffer + total,
e->event, e->event->length)) {
total = -EFAULT;
+ e->destroy(e);
break;
}
--
2.1.3
More information about the dri-devel
mailing list