diff options
author | Jerome Glisse <jglisse@redhat.com> | 2015-02-19 14:47:41 -0500 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2015-02-19 14:47:41 -0500 |
commit | b8ec9ed4fe86952763b963c86f0af0dcae69aa6c (patch) | |
tree | abf2002ae6fa7f2d8434e4c16a98b01653c25a2e | |
parent | 63dc36dc49f93cb00111b497ab6805194bc9d240 (diff) |
Proper leak fix, previous leak fix was bogus.
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
-rw-r--r-- | src/drmmode_display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 60b1fa0e..cebd2060 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -576,6 +576,7 @@ done: else crtc->active = TRUE; #endif + free(output_ids); return ret; } @@ -1374,8 +1375,10 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r drmmode_output = output->driver_private; drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->mode_output = koutput; - koutput = NULL; - goto out_free_encoders; + for (i = 0; i < koutput->count_encoders; i++) + drmModeFreeEncoder(kencoders[i]); + free(kencoders); + return; } } |