summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-08-23 19:27:03 -0700
committerFlorin Coras <fcoras@cisco.com>2018-08-23 19:27:03 -0700
commitfcbda8951e68bf5755e9aa452706ab6af06828cc (patch)
tree370c6b7bbd09918b295406a229de916b2d1bc7a8
parent869031c5858c0554e499485f2f28c43e3a32e6dd (diff)
session: fix retrieval of local sessions if app is detached
Change-Id: I0f5c1dc99610b65646c3b5cf8da7aea273371e4d Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/session/application.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 3e127df3bd2..99f3ec89cde 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -989,7 +989,9 @@ application_get_local_session_from_handle (session_handle_t handle)
application_t *server;
u32 session_index, server_index;
local_session_parse_handle (handle, &server_index, &session_index);
- server = application_get (server_index);
+ server = application_get_if_valid (server_index);
+ if (!server)
+ return 0;
return application_get_local_session (server, session_index);
}