]> xenbits.xensource.com Git - libvirt.git/commit
ch: Don't leak ch_driver->chCaps
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 28 Nov 2023 15:35:22 +0000 (16:35 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 29 Nov 2023 07:54:14 +0000 (08:54 +0100)
commit944fe54b6e2ec4b92dbd96ba427e4070f2e05086
tree9caf2acf1fa46d259705bc903391b7454c5c4068
parentf3573b5efaa2002c6c9efc379e3f8578c9bbbdf5
ch: Don't leak ch_driver->chCaps

During CH driver initialization (chStateInitialize()) the
driver's capabilities bitmap is allocated
(virCHCapsInitCHVersionCaps()), but corresponding free call is
missing in chStateCleanup().

And while at it, reorder calls to virObjectUnref() inside of
chStateCleanup() to be the reverse order of that in
chStateInitialize() so that it's easier to spot missing
free/unref call.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/ch/ch_driver.c