diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-11-14 14:31:34 +0900 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-12-14 17:10:51 +0000 |
commit | a07cf7f08d79924ba00fd702230d3e1690eebc5e (patch) | |
tree | d5fcf0e7e2fd6b0f308ca61a5b49ca0f724f6c4b /libkms | |
parent | 0645648dd08942face3cad03bedcdd39e3a6f5fc (diff) | |
download | libdrm-a07cf7f08d79924ba00fd702230d3e1690eebc5e.tar.gz libdrm-a07cf7f08d79924ba00fd702230d3e1690eebc5e.tar.bz2 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.c | 3 |
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, 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)); |