Alex Elder 3ff5f385b1 libceph: fix a osd request memory leak
If an invalid layout is provided to ceph_osdc_new_request(), its
call to calc_layout() might return an error.  At that point in the
function we've already allocated an osd request structure, so we
need to free it (drop a reference) in the event such an error
occurs.

The only other value calc_layout() will return is 0, so make that
explicit in the successful case.

This resolves:
    http://tracker.ceph.com/issues/4240

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-05-01 21:14:22 -07:00
..
2012-04-15 12:44:40 -04:00
2011-03-29 12:11:16 -07:00
2010-11-21 10:04:04 -08:00
2011-07-19 11:25:04 -07:00
2013-02-25 15:37:18 -06:00
2013-03-11 14:31:00 -07:00