Project

General

Profile

Bug #57517

rgw_placement_rule pointer not initialized in RGWListMultipart

Added by Yuval Lifshitz over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

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

Description

should be initialized in ctor, or even better, initialize together with the rest of the data members when defined.
pointer is passed (without being initialized) in "RGWListMultipart::execute()" to "upload->get_info()" which, in turn, check whether it is null or not.

coverity CID 717374

History

#1 Updated by Daniel Gryniewicz over 1 year ago

This is a false positive. In RGWListMultipart::execute(), we pass &placement, and that is checked for null (to see if we can write to it). So after the call to upload->get_info(), placement will either have a value or be nullptr (it's an out-argument). There's no harm to initializing it in the constructor, but it won't make a difference, as the code is currently correct.

#2 Updated by Yuval Lifshitz over 1 year ago

  • Status changed from New to Rejected

Also available in: Atom PDF