diff options
author | Ville Syrjälä <ville.syrjala at linux.intel.com> | 2012-02-02 14:53:39 -0500 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2012-02-02 14:53:39 -0500 |
commit | df497e9281036ca9397bc5a08a82fdf44dbc12b2 (patch) | |
tree | b10f8d5847526a8d6c68a6dcd2d1b9221d3545cd | |
parent | c51f7f0e460dcadb9f1a56ecf1615810877c33c8 (diff) |
drmModeFreeResources() always leaked some memory.
drmModeGetPlaneResources() and drmModeGetPlane() leaked in one error
path.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
-rw-r--r-- | xf86drmMode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c index da7b4620..e67ed4a3 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; } |