]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetSSHSessionAuthAddPasswordAuth: Don't access unlocked 'sess'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Jan 2023 15:40:00 +0000 (16:40 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Jan 2023 12:10:31 +0000 (13:10 +0100)
commit6aed6becece4145bf19c3b485d3eaff0241532b3
treecea6dabe178b9592db5e2756738731b28f099290
parentc97b632283ff693b80b7deda3e8f526f1f115dca
virNetSSHSessionAuthAddPasswordAuth: Don't access unlocked 'sess'

'sess->authPath' is modified before locking the 'sess' object.
Additionally on failure of 'virAuthGetConfigFilePathURI' 'sess' would be
unlocked even when it was not yet locked.

Fixes: 273745b43122a77adf8c73b2e0a852ac42387349
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/rpc/virnetsshsession.c