summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-09-18 20:57:39 -0700
committerFrancisco Jerez <[email protected]>2013-10-21 10:47:03 -0700
commit9e0b7f76f95dd45c99e95076badba2c8f123c31a (patch)
tree63125403182732b11cf8c2917828b645eb979f0c /src
parent1d741e3ac06300437c26675e5503a8b791970e0b (diff)
clover: Fix memory leak when initializing a device object fails.
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/clover/core/platform.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/core/platform.cpp b/src/gallium/state_trackers/clover/core/platform.cpp
index e35b1f96da5..762a015ca1a 100644
--- a/src/gallium/state_trackers/clover/core/platform.cpp
+++ b/src/gallium/state_trackers/clover/core/platform.cpp
@@ -33,6 +33,8 @@ platform::platform() : adaptor_range(derefs(), devs) {
for (pipe_loader_device *ldev : ldevs) {
try {
devs.push_back(transfer(new device(*this, ldev)));
- } catch (error &) {}
+ } catch (error &) {
+ pipe_loader_release(&ldev, 1);
+ }
}
}