block: rbd: fixed may leaks
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 26 Sep 2010 08:59:37 +0000 (12:59 +0400)
committerSage Weil <sage@newdream.net>
Wed, 20 Oct 2010 22:38:19 +0000 (15:38 -0700)
commit28f259b7cd78eb29d38b7ae6b475d656e08fd348
tree4cbefc4ad9562af2c221b6fec52bb560772f0a40
parent496e59553c51ce18acc836de070106b583926b87
block: rbd: fixed may leaks

rbd_client_create() doesn't free rbdc, this leads to many leaks.

seg_len in rbd_do_op() is unsigned, so (seg_len < 0) makes no sense.
Also if fixed check fails then seg_name is leaked.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
drivers/block/rbd.c