From 56c4a9b692ee7db77599ed5f73772f1f6beb4a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Sat, 23 Oct 2010 01:22:43 +0200 Subject: [PATCH] shm: Use the right counter when freeing buffers --- sys/shm/shmpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c index 9f05f1ae5d..40bd18fee5 100644 --- a/sys/shm/shmpipe.c +++ b/sys/shm/shmpipe.c @@ -548,7 +548,7 @@ sp_writer_send_buf (ShmPipe * self, char *buf, size_t size) } if (c == 0) { - spalloc_free1 (sizeof (ShmBuffer) + sizeof (int) * self->num_clients, sb); + spalloc_free1 (sizeof (ShmBuffer) + sizeof (int) * sb->num_clients, sb); return 0; } @@ -784,7 +784,7 @@ sp_shmbuf_dec (ShmPipe * self, ShmBuffer * buf, ShmBuffer * prev_buf) shm_alloc_space_block_dec (buf->ablock); sp_shm_area_dec (self, buf->shm_area); - spalloc_free1 (sizeof (ShmBuffer) + sizeof (int) * buf->num_clients, buf); + spalloc_free1 (sizeof (ShmBuffer) + sizeof (int) * sb->num_clients, buf); return 0; }