sosd: Fix uninitialized variable use. hotfix-0.3.1 0.3.1
authorFilippos Giannakos <philipgian@grnet.gr>
Wed, 5 Jun 2013 14:36:47 +0000 (17:36 +0300)
committerFilippos Giannakos <philipgian@grnet.gr>
Wed, 5 Jun 2013 14:36:47 +0000 (17:36 +0300)
In break lock, instead of cheking the return value of the rados call, we
erroneously checked an uninitialized local variable.

xseg/peers/user/mt-sosd.c

index 57b615e..9ea9608 100644 (file)
@@ -804,7 +804,7 @@ int break_lock(struct radosd *rados, struct rados_io *rio)
                        XSEGLOG2(&lc, E, "Could not list lockers for %s", rio->obj_name);
                        r = -1;
                        break;
-               } else if (r == -ERANGE) {
+               } else if (nr_lockers == -ERANGE) {
                        free(tag);
                        free(clients);
                        free(cookies);