aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Villard2013-01-02 09:55:50 -0600
committerJerome Glisse2013-01-02 09:55:50 -0600
commit1f4b5e11e638fc87bd0ac8e3530b407211b76d45 (patch)
tree3286cb5e44245f223370472f37c463f96865b8ca /libkms/intel.c
parent0980633afd9c7eecc0c75ef3bea4d3c6b7aa1898 (diff)
downloadexternal-libdrm-1f4b5e11e638fc87bd0ac8e3530b407211b76d45.tar.gz
external-libdrm-1f4b5e11e638fc87bd0ac8e3530b407211b76d45.tar.xz
external-libdrm-1f4b5e11e638fc87bd0ac8e3530b407211b76d45.zip
libkms: fix memory leak in error path
Signed-off-by: Maxime Villard <rustyBSD@gmx.fr> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'libkms/intel.c')
-rw-r--r--libkms/intel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkms/intel.c b/libkms/intel.c
index 8b8249b1..abae4525 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -101,6 +101,7 @@ intel_bo_create(struct kms_driver *kms,
101 pitch = (pitch + 512 - 1) & ~(512 - 1); 101 pitch = (pitch + 512 - 1) & ~(512 - 1);
102 size = pitch * ((height + 4 - 1) & ~(4 - 1)); 102 size = pitch * ((height + 4 - 1) & ~(4 - 1));
103 } else { 103 } else {
104 free(bo);
104 return -EINVAL; 105 return -EINVAL;
105 } 106 }
106 107