session: allow builtin apps to register names

Change-Id: I4b428e170436671b329657283cf7653befc85c9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session_test.c b/src/vnet/session/session_test.c
index ceac703..248b4d7 100644
--- a/src/vnet/session/session_test.c
+++ b/src/vnet/session/session_test.c
@@ -159,11 +159,13 @@
     .options = options,
     .namespace_id = 0,
     .session_cb_vft = &dummy_session_cbs,
+    .name = format (0, "session_test"),
   };
 
   error = vnet_application_attach (&attach_args);
   SESSION_TEST ((error == 0), "app attached");
   server_index = attach_args.app_index;
+  vec_free (attach_args.name);
 
   server_sep.is_ip4 = 1;
   vnet_bind_args_t bind_args = {
@@ -236,6 +238,7 @@
     .options = options,
     .namespace_id = 0,
     .session_cb_vft = &dummy_session_cbs,
+    .name = format (0, "session_test"),
   };
 
   vnet_bind_args_t bind_args = {
@@ -524,6 +527,7 @@
   /*
    * Cleanup
    */
+  vec_free (attach_args.name);
   vec_free (ns_id);
   session_delete_loopback (sw_if_index);
   return 0;
@@ -838,6 +842,7 @@
     .options = options,
     .namespace_id = 0,
     .session_cb_vft = &dummy_session_cbs,
+    .name = format (0, "session_test"),
   };
 
   vnet_bind_args_t bind_args = {
@@ -1356,6 +1361,7 @@
   vnet_application_detach (&detach_args);
 
   vec_free (ns_id);
+  vec_free (attach_args.name);
   return 0;
 }
 
@@ -1426,6 +1432,7 @@
     .options = options,
     .namespace_id = 0,
     .session_cb_vft = &dummy_session_cbs,
+    .name = format (0, "session_test"),
   };
 
   attach_args.api_client_index = dummy_server_api_index;
@@ -1481,6 +1488,7 @@
 		"local session endpoint lookup should not work after detach");
   if (verbose)
     unformat_free (&tmp_input);
+  vec_free (attach_args.name);
   return 0;
 }