summaryrefslogtreecommitdiff
path: root/src/pulsecore/memtrap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-19 00:21:34 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-19 00:21:34 +0200
commit996051ebc1883aa335c41a64217794915089a966 (patch)
tree39be83cf90edd6ed8686df8890167ad985a2e638 /src/pulsecore/memtrap.c
parent56e1290ef688ed0836d34492bc55c1f41f09c2f5 (diff)
memtrap: properly add items to linked list
Diffstat (limited to 'src/pulsecore/memtrap.c')
-rw-r--r--src/pulsecore/memtrap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index 373872c1c..4fc182105 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -107,7 +107,10 @@ static void memtrap_link(pa_memtrap *m, unsigned j) {
pa_assert(m);
m->prev[j] = NULL;
- m->next[j] = memtraps[j];
+
+ if ((m->next[j] = memtraps[j]))
+ m->next[j]->prev[j] = m;
+
memtraps[j] = m;
}