aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application_interface.c')
-rw-r--r--src/vnet/session/application_interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index ad4c28b3c77..efdd3dde9ad 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -406,7 +406,7 @@ vnet_application_attach (vnet_app_attach_args_t * a)
a->app_event_queue_address = pointer_to_uword (app->event_queue);
sm = segment_manager_get (app->first_segment_manager);
- fs = segment_manager_get_segment (sm->segment_indices[0]);
+ fs = segment_manager_get_segment_w_lock (sm, 0);
if (application_is_proxy (app))
application_setup_proxy (app);
@@ -415,6 +415,8 @@ vnet_application_attach (vnet_app_attach_args_t * a)
a->segment = &fs->ssvm;
a->app_index = app->index;
+ segment_manager_segment_reader_unlock (sm);
+
return 0;
}