summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mqueuedeletesupp.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-29 20:26:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-29 20:26:42 +0000
commit59efe76bbfea058a70975d83f44f3523e8d7cb6d (patch)
tree04bc6888a5aa1d872f9895704a513a7a67924c51 /cpukit/posix/src/mqueuedeletesupp.c
parent2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-59efe76bbfea058a70975d83f44f3523e8d7cb6d.tar.bz2
2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/mqueuedeletesupp.c: Mark unreachable section as RTEMS_DEBUG.
Diffstat (limited to 'cpukit/posix/src/mqueuedeletesupp.c')
-rw-r--r--cpukit/posix/src/mqueuedeletesupp.c20
1 files changed, 16 insertions, 4 deletions
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 <rtems/seterr.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/time.h>
+#if defined(RTEMS_DEBUG)
+ #include <rtems/bspIo.h>
+#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 );