From c23f23d1012dbee120e730ae49f26bd90f774838 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 5 Mar 2024 11:45:18 -0600 Subject: http-api: T6069: fix allocation outside of thread lock (cherry picked from commit 7503e419d0dbc9ba81f7299d9df173c0a82f20da) --- src/services/vyos-http-api-server | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 40d442e30..a7b14a1a3 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -459,7 +459,6 @@ def _configure_op(data: Union[ConfigureModel, ConfigureListModel, request: Request, background_tasks: BackgroundTasks): session = app.state.vyos_session env = session.get_session_env() - config = Config(session_env=env) endpoint = request.url.path @@ -474,6 +473,8 @@ def _configure_op(data: Union[ConfigureModel, ConfigureListModel, # so the lock is really global lock.acquire() + config = Config(session_env=env) + status = 200 msg = None error_msg = None -- cgit v1.2.3