Skip to content

Commit

Permalink
fix oss-fuzz issue in session cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Jan 20, 2018
1 parent dedff4d commit c0e317f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server/ua_session_manager.c
Expand Up @@ -32,6 +32,9 @@ removeSessionCallback(UA_Server *server, void *entry) {

static UA_StatusCode
removeSession(UA_SessionManager *sm, session_list_entry *sentry) {
/* Detach the Session from the SecureChannel */
UA_Session_detachFromSecureChannel(&sentry->session);

/* Deactivate the session */
sentry->session.activated = false;

Expand All @@ -45,7 +48,8 @@ removeSession(UA_SessionManager *sm, session_list_entry *sentry) {
return retval; /* Try again next time */
}

/* Detach the session and make the capacity available */
/* Detach the session from the session manager and make the capacity
* available */
LIST_REMOVE(sentry, pointers);
UA_atomic_add(&sm->currentSessionCount, (UA_UInt32)-1);
return UA_STATUSCODE_GOOD;
Expand Down

0 comments on commit c0e317f

Please sign in to comment.