aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorSeung-Woo Kim2016-11-13 23:31:34 -0600
committerEmil Velikov2016-12-14 11:10:51 -0600
commita07cf7f08d79924ba00fd702230d3e1690eebc5e (patch)
treed5fcf0e7e2fd6b0f308ca61a5b49ca0f724f6c4b /libkms
parent0645648dd08942face3cad03bedcdd39e3a6f5fc (diff)
downloadexternal-libdrm-a07cf7f08d79924ba00fd702230d3e1690eebc5e.tar.gz
external-libdrm-a07cf7f08d79924ba00fd702230d3e1690eebc5e.tar.xz
external-libdrm-a07cf7f08d79924ba00fd702230d3e1690eebc5e.zip
libkms/exynos: fix memory leak in error path
This patch fixes memory leak in error path of exynos_bo_create(). Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/exynos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libkms/exynos.c b/libkms/exynos.c
index 5de2e5a9..0e97fb51 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -88,7 +88,8 @@ exynos_bo_create(struct kms_driver *kms,
88 pitch = (pitch + 512 - 1) & ~(512 - 1); 88 pitch = (pitch + 512 - 1) & ~(512 - 1);
89 size = pitch * ((height + 4 - 1) & ~(4 - 1)); 89 size = pitch * ((height + 4 - 1) & ~(4 - 1));
90 } else { 90 } else {
91 return -EINVAL; 91 ret = -EINVAL;
92 goto err_free;
92 } 93 }
93 94
94 memset(&arg, 0, sizeof(arg)); 95 memset(&arg, 0, sizeof(arg));