Mesa (20.3): gallium: Fix leak of the merged driconf options.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 3 17:59:32 UTC 2020


Module: Mesa
Branch: 20.3
Commit: 0ee24d08fa2bbf01434c3b00593155302c171f59
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ee24d08fa2bbf01434c3b00593155302c171f59

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Nov 17 16:37:41 2020 -0800

gallium: Fix leak of the merged driconf options.

Fixes: 8a05d6ffc65d ("driconf: Make the driver's declarations be structs instead of XML.")
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7695>
(cherry picked from commit 0626e3a950d5dbe5d86244670b54b67a2af6014c)

---

 .pick_status.json                               | 2 +-
 src/gallium/auxiliary/pipe-loader/pipe_loader.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 0274e40bd66..b8bf26af205 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
         "description": "gallium: Fix leak of the merged driconf options.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "8a05d6ffc65d0fd0e0a52fe84a174d4ca63e5521"
     },
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 29b4993257b..10638a39ed7 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -120,6 +120,7 @@ pipe_loader_load_options(struct pipe_loader_device *dev)
    driParseOptionInfo(&dev->option_info, merged_driconf, merged_count);
    driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
                        dev->driver_name, NULL, NULL, 0, NULL, 0);
+   free((void *)merged_driconf);
 }
 
 char *



More information about the mesa-commit mailing list