Hi,Here is a patch to fix a shared memory leak in WhiteTank when used on FreeBSD systems.
The problem was that the connection ref counter wasn't decremented as it should when a client disconnected (see patch) and so the shared memory segment was never destroyed by ipc.c:conn_info_destroy().
diff -ru openais-whitetank-9-old/exec/ipc.c openais-whitetank-9/exec/ipc.c
--- exec/ipc.c 2009-04-15 15:08:23.000000000 +0200
+++ exec/ipc.c 2009-04-15 15:09:54.000000000 +0200
@@ -630,7 +630,6 @@
res = 0;
break;
}
- openais_conn_refcount_dec (conn_info);
}
#if defined(OPENAIS_SOLARIS) || defined(OPENAIS_BSD) || defined(OPENAIS_DARWIN)
/* On many OS poll never return POLLHUP or POLLERR.
@@ -638,9 +637,11 @@
*/
if (res == 0) {
ipc_disconnect (conn_info);
+ openais_conn_refcount_dec (conn_info);
return (0);
}
#endif
+ openais_conn_refcount_dec (conn_info);
}
openais_conn_refcount_inc (conn_info);
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
