[PATCH 0/2] parthelper: Initialize error object
Ján Tomko
jtomko at redhat.com
Thu Oct 22 11:15:21 UTC 2020
On a Thursday in 2020, Michal Privoznik wrote:
>To observe the error fixed in 1/2 apply the following patch and run
>parthelper under valgrind, e.g. like this:
>
> valgrind libvirt_parthelper /dev/sda -g
>
>
>diff --git i/src/util/virdevmapper.c w/src/util/virdevmapper.c
>index 4d27c9f104..fad76f35a1 100644
>--- i/src/util/virdevmapper.c
>+++ w/src/util/virdevmapper.c
>@@ -57,6 +57,8 @@ virDevMapperGetMajor(unsigned int *major)
> VIR_AUTOSTRINGLIST lines = NULL;
> size_t i;
>
>+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("blah"));
>+
> if (!virFileExists(CONTROL_PATH))
> return -2;
>
>
>Michal Prívozník (2):
> parthelper: Initialize error object
> parthelper: Don't leak @canonical_path
>
> src/storage/parthelper.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201022/9e950780/attachment-0001.sig>
More information about the libvir-list
mailing list