From: Alex Elder Date: Sat, 16 Feb 2013 04:10:17 +0000 (-0600) Subject: libceph: fix a osd request memory leak X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~26^2~253 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ff5f385b1449a07372d51fb89ca94dbfb6a3be2;p=pandora-kernel.git 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 Reviewed-by: Josh Durgin --- Reading git-diff-tree failed