Prevent double freeing of first segment manager. 92/7692/2
authorDave Wallace <dwallacelf@gmail.com>
Thu, 20 Jul 2017 20:36:01 +0000 (16:36 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 20 Jul 2017 21:45:00 +0000 (21:45 +0000)
Change-Id: I27d7cb4c4e142f29a0c3c3ff85dd1f581970abfc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
src/vnet/session/application.c

index 8a95371..076c66f 100644 (file)
@@ -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);