On Sun, 4 Sep 2011, Stefan Hajnoczi wrote:
> On Sat, Sep 3, 2011 at 11:04 PM, Sage Weil wrote:
> > +failed_shutdown:
> > rados_shutdown(s->cluster);
> > + qemu_free(s->snap);
>
> Sorry for being a pain here. This patch is against an old qemu.git
> tree. All memory allocation is now using
On Sat, Sep 3, 2011 at 11:04 PM, Sage Weil wrote:
> +failed_shutdown:
> rados_shutdown(s->cluster);
> + qemu_free(s->snap);
Sorry for being a pain here. This patch is against an old qemu.git
tree. All memory allocation is now using glib's g_malloc()/g_free().
Stefan
Fix leak of s->snap in failure path. Simplify error paths for the whole
function.
Reported-by: Stefan Hajnoczi
Signed-off-by: Sage Weil
---
v2: fixes all error paths, not just the first one.
block/rbd.c | 28 +---
1 files changed, 13 insertions(+), 15 deletions(-)