summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 65d2f08ddca..a0ddaed90cf 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -874,7 +874,15 @@ vnet_application_attach (vnet_app_attach_args_t * a)
fs = segment_manager_get_segment_w_lock (sm, 0);
if (application_is_proxy (app))
- application_setup_proxy (app);
+ {
+ application_setup_proxy (app);
+ /*
+ * I suspect the segment manager pool gets reallocated (because a new listener
+ * is added, and each listener has a segment manager) so sm becomes a dangling
+ * reference. That's why we need to re-grab sm.
+ */
+ sm = segment_manager_get (app_wrk->first_segment_manager);
+ }
ASSERT (vec_len (fs->ssvm.name) <= 128);
a->segment = &fs->ssvm;