summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/application.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 8a953719f81..076c66f1fff 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -106,7 +106,8 @@ application_del (application_t * app)
/*
* Cleanup segment managers
*/
- if (app->connects_seg_manager != (u32) ~ 0)
+ if ((app->connects_seg_manager != (u32) ~ 0) &&
+ (app->connects_seg_manager != app->first_segment_manager))
{
sm = segment_manager_get (app->connects_seg_manager);
segment_manager_del (sm);