diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-09-19 00:21:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-09-19 00:21:34 +0200 |
commit | 996051ebc1883aa335c41a64217794915089a966 (patch) | |
tree | 39be83cf90edd6ed8686df8890167ad985a2e638 | |
parent | 56e1290ef688ed0836d34492bc55c1f41f09c2f5 (diff) |
memtrap: properly add items to linked list
-rw-r--r-- | src/pulsecore/memtrap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c index 373872c1..4fc18210 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; } |