session_api.c: function with return after a jump to an error label