diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-07-31 21:53:21 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-07-31 21:53:21 +0000 |
commit | e2e94ca47c5fc8b52ec28d9811a6da199a2c7262 (patch) | |
tree | 24ebddd3bdbac4208a3185aa0b1686ae2c8e19aa /src/pulsecore/idxset.c | |
parent | d7ee1bcf758241d744002e3aea982295ce9e9247 (diff) |
fix bad memory access if a non-existing entry shall be removed from a pa_idxset by index
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1173 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/idxset.c')
-rw-r--r-- | src/pulsecore/idxset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c index 5c79767d..23fe0b5a 100644 --- a/src/pulsecore/idxset.c +++ b/src/pulsecore/idxset.c @@ -286,6 +286,9 @@ void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) { if (!(a = array_index(s, idx))) return NULL; + if (!*a) + return NULL; + data = (*a)->data; remove_entry(s, *a); |