All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] libkms/exynos: fix memory leak in error path
@ 2016-11-14  5:31 Seung-Woo Kim
  2016-12-14  8:16 ` [RESEND][PATCH] " Seung-Woo Kim
  0 siblings, 1 reply; 6+ messages in thread
From: Seung-Woo Kim @ 2016-11-14  5:31 UTC (permalink / raw)
  To: dri-devel, robclark, inki.dae; +Cc: sw0312.kim

This patch fixes memory leak in error path of exynos_bo_create().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
 libkms/exynos.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libkms/exynos.c b/libkms/exynos.c
index 5de2e5a..0e97fb5 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -88,7 +88,8 @@ exynos_bo_create(struct kms_driver *kms,
 		pitch = (pitch + 512 - 1) & ~(512 - 1);
 		size = pitch * ((height + 4 - 1) & ~(4 - 1));
 	} else {
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_free;
 	}
 
 	memset(&arg, 0, sizeof(arg));
-- 
1.7.4.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-14 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14  5:31 [PATCH libdrm] libkms/exynos: fix memory leak in error path Seung-Woo Kim
2016-12-14  8:16 ` [RESEND][PATCH] " Seung-Woo Kim
2016-12-14 12:07   ` Eric Engestrom
2016-12-14 12:21     ` Emil Velikov
2016-12-14 13:12       ` Eric Engestrom
2016-12-14 17:12         ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.