mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
parthelper: Initialize error object
Some functions called from parthelper can report an error. But that means that the error object must be initialized otherwise virResetError() (which happens as a part of virReportError()) will free random pointers. Reported-by: Katerina Koukiou <kkoukiou@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7b1ed1cd73
commit
3b8deb9603
@ -66,7 +66,8 @@ int main(int argc, char **argv)
|
||||
const char *partsep;
|
||||
bool devmap_partsep = false;
|
||||
|
||||
if (virGettextInitialize() < 0)
|
||||
if (virGettextInitialize() < 0 ||
|
||||
virErrorInitialize() < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
if (argc == 3 && STREQ(argv[2], "-g")) {
|
||||
|
Loading…
Reference in New Issue
Block a user