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/nouveau.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/nouveau.c')
-rw-r--r--libkms/nouveau.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 0e24a155..608092f5 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -102,6 +102,7 @@ nouveau_bo_create(struct kms_driver *kms,
102 pitch = (pitch + 512 - 1) & ~(512 - 1); 102 pitch = (pitch + 512 - 1) & ~(512 - 1);
103 size = pitch * height; 103 size = pitch * height;
104 } else { 104 } else {
105 free(bo);
105 return -EINVAL; 106 return -EINVAL;
106 } 107 }
107 108