summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/extensiondelete.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi/src/extensiondelete.c')
-rw-r--r--cpukit/sapi/src/extensiondelete.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/sapi/src/extensiondelete.c b/cpukit/sapi/src/extensiondelete.c
index 0eaaffd103..f851ea06c2 100644
--- a/cpukit/sapi/src/extensiondelete.c
+++ b/cpukit/sapi/src/extensiondelete.c
@@ -30,13 +30,15 @@ rtems_status_code rtems_extension_delete(
Extension_Control *the_extension;
Objects_Locations location;
+ _Objects_Allocator_lock();
the_extension = _Extension_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
_Objects_Close( &_Extension_Information, &the_extension->Object );
- _Extension_Free( the_extension );
_Objects_Put( &the_extension->Object );
+ _Extension_Free( the_extension );
+ _Objects_Allocator_unlock();
return RTEMS_SUCCESSFUL;
#if defined(RTEMS_MULTIPROCESSING)
@@ -46,5 +48,7 @@ rtems_status_code rtems_extension_delete(
break;
}
+ _Objects_Allocator_unlock();
+
return RTEMS_INVALID_ID;
}