Closed
Bug 1303368
Opened 9 years ago
Closed 9 years ago
Delete unused function BuildURLAttachmentData (fixing Coverity CID 1372981)
Categories
(MailNews Core :: Composition, defect)
MailNews Core
Composition
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 51.0
People
(Reporter: rkent, Assigned: rkent)
Details
Attachments
(1 file)
|
1.67 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
** 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
| Assignee | ||
Comment 1•9 years ago
|
||
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)
| Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8792025 -
Flags: review?(jorgk) → review+
| Assignee | ||
Comment 2•9 years ago
|
||
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.
Description
•