]>
git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: use delete[] properly
==4986== Mismatched free() / delete / delete []
==4986== at 0x4C2658C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4986== by 0x4ED8EA9: librbd::ImageCtx::~ImageCtx() (ImageCtx.cc:100)
==4986== by 0x4EF3827: librbd::close_image(librbd::ImageCtx*) (internal.cc:1869)
==4986== by 0x4EE8FB8: librbd::clone(librados::IoCtx&, char const*, char const*, librados::IoCtx&, char const*, unsigned long, int*, unsigned long, int) (internal.cc:900)
==4986== by 0x4EC363C: rbd_clone2 (librbd.cc:553)
==4986== by 0x404C85: do_clone (fsx.c:836)
==4986== by 0x405639: test (fsx.c:1048)
==4986== by 0x406369: main (fsx.c:1523)
==4986== Address 0xd498b30 is 0 bytes inside a block of size 37 alloc'd
==4986== at 0x4C26CF7: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4986== by 0x4ED9B4D: librbd::ImageCtx::init_layout() (ImageCtx.cc:164)
==4986== by 0x4ED9845: librbd::ImageCtx::init() (ImageCtx.cc:142)
==4986== by 0x4EF3449: librbd::open_image(librbd::ImageCtx*, bool) (internal.cc:1828)
==4986== by 0x4EE89E0: librbd::clone(librados::IoCtx&, char const*, char const*, librados::IoCtx&, char const*, unsigned long, int*, unsigned long, int) (internal.cc:871)
==4986== by 0x4EC363C: rbd_clone2 (librbd.cc:553)
==4986== by 0x404C85: do_clone (fsx.c:836)
==4986== by 0x405639: test (fsx.c:1048)
==4986== by 0x406369: main (fsx.c:1523)
Signed-off-by: Sage Weil <sage@inktank.com>