From: Alex Elder Date: Fri, 30 Nov 2012 15:59:47 +0000 (-0600) Subject: rbd: don't leak rbd_req on synchronous requests X-Git-Tag: v3.9-rc1~41^2~21^2~59^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e53c6c379b65372df21f4d6019f6eb63af81384;p=pandora-kernel.git rbd: don't leak rbd_req on synchronous requests When rbd_do_request() is called it allocates and populates an rbd_req structure to hold information about the osd request to be sent. This is done for the benefit of the callback function (in particular, rbd_req_cb()), which uses this in processing when the request completes. Synchronous requests provide no callback function, in which case rbd_do_request() waits for the request to complete before returning. This case is not handling the needed free of the rbd_req structure like it should, so it is getting leaked. Note however that the synchronous case has no need for the rbd_req structure at all. So rather than simply freeing this structure for synchronous requests, just don't allocate it to begin with. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed