]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vshtabletest: Fix potential memleak
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Dec 2021 09:23:15 +0000 (10:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 17 Dec 2021 14:05:42 +0000 (15:05 +0100)
commiteb9bbde7721af765d88086dc3055cff092436c58
treedbfb79d60135fc226880f124555d2e2923353f4b
parentc196179b3b58364123a64a046a5e30575f32577a
vshtabletest: Fix potential memleak

In testVshTableNew() we test whether vshTableNew(NULL) allocates
a table. This is expected to fail (and return NULL), because
passing nothing but NULL to vshTableNew() is viewed as error.
Nevertheless, if vshTableNew() did not fail and returned an
allocated table it would be leaked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/vshtabletest.c