aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBartosz Tomczyk <[email protected]>2017-01-29 19:10:25 +0100
committerMarek Olšák <[email protected]>2017-02-08 17:36:05 +0100
commit94262e5f5db1f5c7865ced251c440bc5f3f4a89d (patch)
treeaf6b9a3ec7752fe71255b868ab42e47dca8d23fb /src
parent90014d07667294094cdb6d9c5c8ac3f2338781fa (diff)
r600/sb: Fix memory leak
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/sb/sb_valtable.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_valtable.cpp b/src/gallium/drivers/r600/sb/sb_valtable.cpp
index a8b7b49cd41..d31a1b76d58 100644
--- a/src/gallium/drivers/r600/sb/sb_valtable.cpp
+++ b/src/gallium/drivers/r600/sb/sb_valtable.cpp
@@ -241,6 +241,7 @@ void value::remove_use(const node *n) {
{
// TODO assert((*it)->kind == kind) ?
// TODO assert((*it)->arg == arg) ?
+ delete *it;
uses.erase(it);
}
}
@@ -290,7 +291,12 @@ bool value::is_prealloc() {
}
void value::delete_uses() {
- uses.erase(uses.begin(), uses.end());
+ for (uselist::iterator it = uses.begin(); it != uses.end(); ++it)
+ {
+ delete *it;
+ }
+
+ uses.clear();
}
void ra_constraint::update_values() {