Closed Bug 1020432 Opened 6 years ago Closed 6 years ago

Leak of |buf| in nsAuthSambaNTLM::GetNextToken

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mccr8, Assigned: Natch, Mentored)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file, 1 obsolete file)

At the end of this method, it calls ExtractMessage(), which allocates a new buffer, and returns it to |buf|.  Then nothing frees it on success.
Whiteboard: [mentor=mccr8] [good first bug]
Just moving the |free(buf);| call above the if block should do it, no?

Taking.
Assignee: nobody → highmind63
Status: NEW → ASSIGNED
Flags: needinfo?(continuation)
(In reply to Nochum Sossonko [:Natch] from comment #1)
> Just moving the |free(buf);| call above the if block should do it, no?
Yes, that sounds right to me.

> Taking.
Thanks!
Flags: needinfo?(continuation)
Attachment #8440783 - Flags: review?(continuation)
Comment on attachment 8440783 [details] [diff] [review]
free |buf| always when it's successfully allocated

Thanks for the patch!  I'll forward this review to a Necko peer who appear to have done stuff with this file in the past.
Attachment #8440783 - Flags: review?(continuation) → review?(honzab.moz)
Mentor: continuation
Whiteboard: [mentor=mccr8] [good first bug] → [good first bug]
Comment on attachment 8440783 [details] [diff] [review]
free |buf| always when it's successfully allocated

Review of attachment 8440783 [details] [diff] [review]:
-----------------------------------------------------------------

thanks, r=honzab
Attachment #8440783 - Flags: review?(honzab.moz) → review+
Thanks.
Attachment #8440783 - Attachment is obsolete: true
Attachment #8443099 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/35c527229cdb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug]
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.