From: Andre Noll Date: Thu, 13 Nov 2008 19:55:51 +0000 (+0100) Subject: call_callback(): Fix a shm leak in afs.c. X-Git-Tag: v0.3.3~35 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=a8beedcaa6f25a0dda36975a30a65a2038df6e30;ds=sidebyside call_callback(): Fix a shm leak in afs.c. We forgot to detach the shm area passed from the child which results in "no space left" messages if many audio files are added and the number of shared memory areas exceeds 4096. --- diff --git a/afs.c b/afs.c index aa008f99..5f47941e 100644 --- a/afs.c +++ b/afs.c @@ -892,7 +892,7 @@ static int call_callback(int fd, int query_shmid) query.data = (char *)query_shm + sizeof(*cq); query.size = cq->query_size; cq->handler(fd, &query); - return 1; + return shm_detach(query_shm); } static int execute_server_command(void)