]> sourceware.org Git - lvm2.git/commitdiff
cov: mask false positive
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Apr 2024 16:34:01 +0000 (18:34 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Apr 2024 22:03:09 +0000 (00:03 +0200)
This code is somewhat complex and involves recursion and pointer
shuffling which confuses coverity here.

Let's add masking comment for this warning as there is no double
free in this code.

device_mapper/ioctl/libdm-iface.c
libdm/ioctl/libdm-iface.c

index df91bb5fd403bf36f51ad584a63e9a5e77dea1ea..fa105761f2e9bbe0ae1eef703fb7b1f32d196367 100644 (file)
@@ -1697,6 +1697,7 @@ static int _create_and_load_v4(struct dm_task *dmt)
        dmt->uuid = NULL;
        free(dmt->mangled_uuid);
        dmt->mangled_uuid = NULL;
+       /* coverity[double_free] recursive function call */
        _dm_task_free_targets(dmt);
 
        if (dm_task_run(dmt))
@@ -1708,6 +1709,7 @@ static int _create_and_load_v4(struct dm_task *dmt)
        dmt->uuid = NULL;
        free(dmt->mangled_uuid);
        dmt->mangled_uuid = NULL;
+       /* coverity[double_free] recursive function call */
        _dm_task_free_targets(dmt);
 
        /*
index 9f37d2602d4b6c81211782138521845f97bb03a0..abc6d3379799faac67737c75eaf65f326060bd22 100644 (file)
@@ -1560,6 +1560,7 @@ static int _create_and_load_v4(struct dm_task *dmt)
        dmt->uuid = NULL;
        dm_free(dmt->mangled_uuid);
        dmt->mangled_uuid = NULL;
+       /* coverity[double_free] recursive function call */
        _dm_task_free_targets(dmt);
 
        if (dm_task_run(dmt))
@@ -1571,6 +1572,7 @@ static int _create_and_load_v4(struct dm_task *dmt)
        dmt->uuid = NULL;
        dm_free(dmt->mangled_uuid);
        dmt->mangled_uuid = NULL;
+       /* coverity[double_free] recursive function call */
        _dm_task_free_targets(dmt);
 
        /*
This page took 0.045344 seconds and 5 git commands to generate.