Project

General

Profile

Bug #4240

libceph: fix a osd request memory leak

Added by Alex Elder about 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

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.

Signed-off-by: Alex Elder <>

History

#1 Updated by Alex Elder about 11 years ago

  • Status changed from In Progress to Fix Under Review

This has been posted for review.

[PATCH] libceph: fix a osd request memory leak

#2 Updated by Alex Elder about 11 years ago

  • Status changed from Fix Under Review to Resolved

This was committed recently and I neglected to close this.

commit 6b3c5cdf66da552096b165a50dbd5313759a6ea6
Author: Alex Elder <>
Date: Fri Feb 15 22:10:17 2013 -0600

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 &lt;&gt;
Reviewed-by: Josh Durgin &lt;&gt;

Also available in: Atom PDF