diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 225e3c07dc..e0be9519df 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2009-07-29 Joel Sherrill + + * posix/src/mqueuedeletesupp.c: Mark unreachable section as + RTEMS_DEBUG. + 2009-07-29 Joel Sherrill * posix/src/killinfo.c: Add _Thread_Enable_dispatch() on EAGAIN diff --git a/cpukit/posix/src/mqueuedeletesupp.c b/cpukit/posix/src/mqueuedeletesupp.c index 2aec9c0898..4c95b08c95 100644 --- a/cpukit/posix/src/mqueuedeletesupp.c +++ b/cpukit/posix/src/mqueuedeletesupp.c @@ -11,7 +11,7 @@ * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open * time. * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -39,6 +39,9 @@ #include #include #include +#if defined(RTEMS_DEBUG) + #include +#endif /*PAGE * @@ -50,11 +53,20 @@ void _POSIX_Message_queue_Delete( ) { if ( !the_mq->linked && !the_mq->open_count ) { - /* the name memory may have been freed by unlink. */ Objects_Control *the_object = &the_mq->Object; - if ( the_object->name.name_p ) - _Workspace_Free( (void *)the_object->name.name_p ); + #if defined(RTEMS_DEBUG) + /* + * the name memory will have been freed by unlink. + */ + if ( the_object->name.name_p ) { + printk( + "POSIX MQ name (%p) not freed by unlink\n", + (void *)the_object->name.name_p + ); + _Workspace_Free( (void *)the_object->name.name_p ); + } + #endif _Objects_Close( &_POSIX_Message_queue_Information, the_object );