Fix potential transaction leak 50/116450/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 5 May 2025 23:15:44 +0000 (01:15 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Tue, 6 May 2025 11:11:57 +0000 (11:11 +0000)
commite773885c361f8f986904298beaae601ffbf5c388
tree4946c76a5a580aa5351bc005a9cae9425a2a8612
parent494e3a286396436f8398eb75c2d9b0bc1fee3e06
Fix potential transaction leak

We allocate the transaction too early and if we end up throwing an
exception we end up not aboring it, leading to a leak.

Move allocation to where we need it, making it clear we not lose track
of it.

JIRA: NETCONF-1449
Change-Id: I3f282cb09ab03251c81e36547a27ba60316efc4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
plugins/restconf-server-mdsal/src/main/java/org/opendaylight/restconf/server/mdsal/MdsalRestconfStreamRegistry.java