Closed Bug 569454 Opened 15 years ago Closed 14 years ago

bad ownership model for allProperties in GRE_GetGREPathWithProperties

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b9

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

159 GRE_GetGREPathWithProperties(const GREVersionRange *versions,

171   GREProperty *allProperties = new GREProperty[propertiesLength + 1];

189   if (env && *env) {
194 #if XP_UNIX
195     if (realpath(p, aBuffer))
196       return NS_OK;
197 #elif WINCE
209     return NS_OK;
210 #elif XP_WIN
211     if (_fullpath(aBuffer, p, aBufLen))
212       return NS_OK;
213 #elif XP_OS2
218       return NS_OK;
220 #elif XP_BEOS
227       return NS_OK;
232 #endif
234     if (strlen(p) >= aBufLen)
235       return NS_ERROR_FILE_NAME_TOO_LONG;
239     return NS_OK;


244   if (env && *env) {
246     return NS_OK;

249 #ifdef XP_MACOSX
296   if (aBuffer[0])
297     return NS_OK;

471   return NS_ERROR_FAILURE;
Attached patch proposalSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #496458 - Flags: review?(benjamin)
Attachment #496458 - Flags: approval2.0?
Comment on attachment 496458 [details] [diff] [review]
proposal

I really don't care because I hope nobody uses this API any more and it's scheduled for removal, but sure.
Attachment #496458 - Flags: review?(benjamin)
Attachment #496458 - Flags: review+
Attachment #496458 - Flags: approval2.0?
Attachment #496458 - Flags: approval2.0+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/125be03bd296
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: