lvm: Fix two wrong array indexes.
authorSascha Wildner <saw@online.de>
Sat, 18 May 2013 01:16:29 +0000 (03:16 +0200)
committerSascha Wildner <saw@online.de>
Sat, 18 May 2013 01:16:43 +0000 (03:16 +0200)
Both files are not used by us. Just in case someone wants to play with
them.

contrib/lvm2/dist/daemons/clvmd/refresh_clvmd.c
contrib/lvm2/dist/lib/locking/cluster_locking.c

index f3d6d0a..65cf59b 100644 (file)
@@ -253,7 +253,7 @@ static int _cluster_request(char cmd, const char *node, void *data, int len,
                        /* Free up everything else and return error */
                        int j;
                        for (j = 0; j < i; j++)
-                               dm_free(rarray[i].response);
+                               dm_free(rarray[j].response);
                        free(*response);
                        errno = ENOMEM;
                        status = -1;
index ace335f..2fb4ba5 100644 (file)
@@ -265,7 +265,7 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int le
                        /* Free up everything else and return error */
                        int j;
                        for (j = 0; j < i; j++)
-                               dm_free(rarray[i].response);
+                               dm_free(rarray[j].response);
                        free(*response);
                        errno = ENOMEM;
                        status = -1;