From c896bc48d291b066c8d4df767c24c75fbcd4465c Mon Sep 17 00:00:00 2001 From: Sang Woo Kim Date: Thu, 23 Jul 2026 23:58:59 +0900 Subject: [PATCH] RTEMS-posix: free the epicsEventOSD in epicsEventDestroy() epicsEventCreate() mallocs the wrapper but epicsEventDestroy() only destroys the embedded rtems_binary_semaphore, leaking one heap block per event lifecycle on every RTEMS >= 5 build. --- modules/libcom/src/osi/os/RTEMS-posix/osdEvent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/libcom/src/osi/os/RTEMS-posix/osdEvent.c b/modules/libcom/src/osi/os/RTEMS-posix/osdEvent.c index 8c2c81e3e..51ed2bd35 100644 --- a/modules/libcom/src/osi/os/RTEMS-posix/osdEvent.c +++ b/modules/libcom/src/osi/os/RTEMS-posix/osdEvent.c @@ -45,6 +45,7 @@ LIBCOM_API void epicsEventDestroy(epicsEventId pSem) { rtems_binary_semaphore_destroy(&pSem->rbs); + free(pSem); } LIBCOM_API epicsEventStatus