Re: [PATCH 0/2] parthelper: Initialize error object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux