]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: fix valgrind warning on rbd_get_parent_info call
authorJason Dillaman <dillaman@redhat.com>
Tue, 28 Apr 2015 19:25:49 +0000 (15:25 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 17 Jul 2015 18:17:04 +0000 (14:17 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 2586e3ba1e20603a87c833513e09dae9281beb4d)

src/pybind/rbd.py

index 334e4c750103c6d9889be8dc5c92f28683d06f68..35bf5c7613a674387a9888f1152865166373e580 100644 (file)
@@ -466,8 +466,12 @@ class Image(object):
             pool = create_string_buffer(size)
             name = create_string_buffer(size)
             snapname = create_string_buffer(size)
-            ret = self.librbd.rbd_get_parent_info(self.image, pool, len(pool),
-                name, len(name), snapname, len(snapname))
+            ret = self.librbd.rbd_get_parent_info(self.image, byref(pool),
+                                                  c_size_t(size),
+                                                  byref(name),
+                                                  c_size_t(size),
+                                                  byref(snapname),
+                                                  c_size_t(size))
             if ret == -errno.ERANGE:
                 size *= 2