diff options
author | Emil Velikov <[email protected]> | 2014-11-07 03:45:07 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-11-07 18:32:07 +0000 |
commit | f6432c4d72e17a106e95dab98fabf43a43a501a9 (patch) | |
tree | ac70d47c15e7ef8e015de868fdaabd48d5a54095 /src/gbm/backends/dri | |
parent | 8ed08e69bca515e6b116d0306390cdd119acc140 (diff) |
gbm/dri: cleanup memory leak on teardown
During teardown we free the driver_configs list pointer, but we forget
to deallocate each config in that list.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gbm/backends/dri')
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index f637e323db9..066426617ba 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -914,8 +914,11 @@ static void dri_destroy(struct gbm_device *gbm) { struct gbm_dri_device *dri = gbm_dri_device(gbm); + unsigned i; dri->core->destroyScreen(dri->screen); + for (i = 0; dri->driver_configs[i]; i++) + free((__DRIconfig *) dri->driver_configs[i]); free(dri->driver_configs); dlclose(dri->driver); free(dri->base.driver_name); |