From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> drmModeFreeResources() always leaked some memory. drmModeGetPlaneResources() and drmModeGetPlane() leaked in one error path. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- xf86drmMode.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/xf86drmMode.c b/xf86drmMode.c index da7b462..e67ed4a 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -96,6 +96,10 @@ void drmModeFreeResources(drmModeResPtr ptr) if (!ptr) return; + drmFree(ptr->fbs); + drmFree(ptr->crtcs); + drmFree(ptr->connectors); + drmFree(ptr->encoders); drmFree(ptr); } @@ -898,6 +902,7 @@ retry: ovr.count_format_types, sizeof(uint32_t)); if (ovr.count_format_types && !r->formats) { drmFree(r->formats); + drmFree(r); r = 0; } @@ -951,6 +956,7 @@ retry: res.count_planes, sizeof(uint32_t)); if (res.count_planes && !r->planes) { drmFree(r->planes); + drmFree(r); r = 0; } -- 1.7.3.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel