projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
056500b
)
tests/kms_flip: don't leak the connector_config struct
author
Paulo Zanoni
<paulo.r.zanoni@intel.com>
Mon, 30 Dec 2013 13:33:16 +0000
(11:33 -0200)
committer
Paulo Zanoni
<paulo.r.zanoni@intel.com>
Tue, 7 Jan 2014 11:57:04 +0000
(09:57 -0200)
... in case we can't find a compatible mode. We already have
config[0], we can't return without freeing it first.
Caught by Valgrind.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
tests/kms_flip.c
patch
|
blob
|
history
diff --git
a/tests/kms_flip.c
b/tests/kms_flip.c
index
b0f0754
..
f57462f
100644
(file)
--- a/
tests/kms_flip.c
+++ b/
tests/kms_flip.c
@@
-954,8
+954,10
@@
static void connector_find_compatible_mode(int crtc_idx0, int crtc_idx1,
return;
if (kmstest_get_connector_config(drm_fd, o->_connector[1],
- 1 << crtc_idx1, &config[1]) < 0)
+ 1 << crtc_idx1, &config[1]) < 0) {
+ kmstest_free_connector_config(&config[0]);
return;
+ }
mode[0] = &config[0].default_mode;
mode[1] = &config[1].default_mode;