From: Michel Dänzer <michel.daen...@amd.com>

We were not doing so in all cases, leaking memory allocated by the
latter.

Signed-off-by: Michel Dänzer <michel.daen...@amd.com>
---
 src/drmmode_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3cbf2bd7d..2cef93cdd 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1891,8 +1891,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
                                drmModeFreeProperty(props);
                                break;
                        }
-                       drmModeFreeProperty(props);
                }
+               drmModeFreeProperty(props);
        }
 
        kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders);
@@ -1986,8 +1986,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, drmModeResPtr mode_r
                                drmModeFreeProperty(props);
                                break;
                        }
-                       drmModeFreeProperty(props);
                }
+               drmModeFreeProperty(props);
        }
 
        if (dynamic) {
-- 
2.14.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to