]> xenbits.xensource.com Git - libvirt.git/commit
rpc: rename virNetSessionAuthMethodsFree to virNetSessionAuthMethodsClear
authorLaine Stump <laine@redhat.com>
Thu, 4 Feb 2021 02:51:04 +0000 (21:51 -0500)
committerLaine Stump <laine@redhat.com>
Fri, 5 Feb 2021 05:22:09 +0000 (00:22 -0500)
commit1745297d51929107e31d0adb3ae5240751c29b03
tree132e10995a97e04100fcc3cd54e2528e82757467
parent5fb0c789c383357de16b52aefbb7c62c9409aae2
rpc: rename virNetSessionAuthMethodsFree to virNetSessionAuthMethodsClear

This is another *Free() function that doesn't free the object it is
passed. Instead it frees and clears some parts of the object.

In this case, the function is actually called from two places, and one
of them (virNetSSHSessionAuthReset) appears to be assuming that the
pointers actually *will* be cleared. So the proper thing to do here
(?) is to rename the function to virNetSSHSesionAuthMethodsClear().

(NB: virNetSSHSessionAuthReset is seemingly never called from
anywhere. Is this one of those functions that actually *is* called by
some strange MACRO invocation? Or it is truly one of those
"written-but-never-used" functions that can be deleted? (if the latter
is the case, then I would rather move the contents of
virNetSessionAuthMethodsFree() into its only other caller,
virNetSSHSessionDispose(), so that the VIR_FREEs could be replaced
with g_free.)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/rpc/virnetsshsession.c