]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vsh: Use g_auto() for string lists returned in readline command/options generators
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Feb 2021 10:09:01 +0000 (11:09 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Feb 2021 10:51:59 +0000 (11:51 +0100)
commit9ad2cb6e73d57731742a21b7642d0e22f34298b8
tree050f7e0bf24daf464aa675d783200e7f43d8fbb3
parenteac14234c83b926c4208ff625f2782371cfd0baa
vsh: Use g_auto() for string lists returned in readline command/options generators

There are two functions that are used to generate completion
lists: vshReadlineCommandGenerator() for command names and
vshReadlineOptionsGenerator() for --options for given command.
Both return a string list, but may also fail while constructing
it. For that case, they call g_strfreev() explicitly, which is
needless since we have g_auto(GStrv).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
tools/vsh.c