]> sourceware.org Git - lvm2.git/commitdiff
Fix memory leak of allocated bitmap in error path
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 6 Sep 2011 18:15:43 +0000 (18:15 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 6 Sep 2011 18:15:43 +0000 (18:15 +0000)
Found by static analyzer.

WHATS_NEW
daemons/cmirrord/cluster.c

index e084607062ad5c007ca4fa2ba2a999594c647e22..6004024679f19475d026a343bd022918b350a2e4 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Fix error path bitmap leak in cmirrord import_checkpoint().
   Log unlink() error in cmirrord remove_lockfile().
   Remove incorrect requirement for -j or -m from lvchange error message.
   Fix unsafe table load when splitting off smaller mirror from a larger one.
index b6c925aa05cd301ec2e9adfda7b68dbf8cb5055f..ad1d7dceba19f9c4db19e7d0e5a95c968f845cca 100644 (file)
@@ -619,6 +619,7 @@ open_retry:
        if (rv != SA_AIS_OK) {
                LOG_ERROR("[%s] Failed to open checkpoint: %s",
                          SHORT_UUID(entry->name.value), str_ais_error(rv));
+               free(bitmap);
                return -EIO; /* FIXME: better error */
        }
 
@@ -647,6 +648,7 @@ init_retry:
        if (rv != SA_AIS_OK) {
                LOG_ERROR("[%s] Sync checkpoint section creation failed: %s",
                          SHORT_UUID(entry->name.value), str_ais_error(rv));
+               free(bitmap);
                return -EIO; /* FIXME: better error */
        }
 
This page took 0.041124 seconds and 5 git commands to generate.