summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/dpmemdelete.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/dpmemdelete.c')
-rw-r--r--cpukit/rtems/src/dpmemdelete.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/rtems/src/dpmemdelete.c b/cpukit/rtems/src/dpmemdelete.c
index d6b42ffcc0..6f11a53a0b 100644
--- a/cpukit/rtems/src/dpmemdelete.c
+++ b/cpukit/rtems/src/dpmemdelete.c
@@ -32,13 +32,15 @@ rtems_status_code rtems_port_delete(
Dual_ported_memory_Control *the_port;
Objects_Locations location;
+ _Objects_Allocator_lock();
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
- _Dual_ported_memory_Free( the_port );
_Objects_Put( &the_port->Object );
+ _Dual_ported_memory_Free( the_port );
+ _Objects_Allocator_unlock();
return RTEMS_SUCCESSFUL;
#if defined(RTEMS_MULTIPROCESSING)
@@ -48,5 +50,7 @@ rtems_status_code rtems_port_delete(
break;
}
+ _Objects_Allocator_unlock();
+
return RTEMS_INVALID_ID;
}