Closed Bug 1303368 Opened 9 years ago Closed 9 years ago

Delete unused function BuildURLAttachmentData (fixing Coverity CID 1372981)

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 51.0

People

(Reporter: rkent, Assigned: rkent)

Details

Attachments

(1 file)

** CID 1372981: Resource leaks (RESOURCE_LEAK) /mailnews/compose/src/nsMsgSend.cpp: 4179 in BuildURLAttachmentData(nsIURI *)() ________________________________________________________________________________________________________ *** CID 1372981: Resource leaks (RESOURCE_LEAK) /mailnews/compose/src/nsMsgSend.cpp: 4179 in BuildURLAttachmentData(nsIURI *)() 4173 return nullptr; 4174 4175 // Now get a readable name... 4176 nsAutoCString spec; 4177 nsresult rv = url->GetSpec(spec); 4178 if (NS_FAILED(rv)) >>> CID 1372981: Resource leaks (RESOURCE_LEAK) >>> Variable "attachments" going out of scope leaks the storage it points to. 4179 return nullptr; 4180 if (!spec.IsEmpty()) 4181 { 4182 theName = strrchr(spec.get(), '/'); 4183 } 4184
I could not find any callers of this function that Coverity is complaining about after the URL error checks were added, so we might as well delete it.
Attachment #8792025 - Flags: review?(jorgk)
Status: NEW → ASSIGNED
Attachment #8792025 - Flags: review?(jorgk) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: