Closed Bug 505857 Opened 11 years ago Closed 11 years ago

CategoryNode::AddLeaf can return without unlocking mLock

Categories

(Core :: XPCOM, defect, critical)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: benjamin)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, hang)

Attachments

(1 file)

289 CategoryNode::AddLeaf(const char* aEntryName,
296   PR_Lock(mLock);

300   nsresult rv = NS_OK;
301   if (leaf) {
304       rv = NS_ERROR_INVALID_ARG;
305   } else {
308       rv = NS_ERROR_OUT_OF_MEMORY;
312         rv = NS_ERROR_OUT_OF_MEMORY;
319       rv = NS_ERROR_OUT_OF_MEMORY;
324 *_retval = ToNewCString(nsDependentCString(toDup));
325 if (!*_retval)
326 return NS_ERROR_OUT_OF_MEMORY;

339   PR_Unlock(mLock);
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #390063 - Flags: review?
Attachment #390063 - Flags: review? → review?(timeless)
Comment on attachment 390063 [details] [diff] [review]
Fix locking, use mozilla::Mutex, rev. 1

someday someone should clean up that function now that it's using an autolock :)
Attachment #390063 - Flags: review?(timeless) → review+
http://hg.mozilla.org/mozilla-central/rev/d18fc4202739
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.