Closed
Bug 586731
Opened 14 years ago
Closed 14 years ago
jsd_NewSourceText leaks new_url_string ifndef LIVEWIRE
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, memory-leak)
Attachments
(1 file)
2.54 KB,
patch
|
jorendorff
:
review+
beltzner
:
approval2.0-
|
Details | Diff | Splinter Review |
378 jsd_NewSourceText(JSDContext* jsdc, const char* url)
381 const char* new_url_string;
385 #ifdef LIVEWIRE
386 new_url_string = url; /* we take ownership of alloc'd string */
387 #else
388 new_url_string = jsd_BuildNormalizedURL(url);
389 #endif
393 jsdsrc = jsd_FindSourceForURL(jsdc, new_url_string);
395 if( jsdsrc )
396 {
397 if( jsdsrc->doingEval )
398 {
399 #ifdef LIVEWIRE
400 free((char*)new_url_string);
401 #endif
402 JSD_UNLOCK_SOURCE_TEXT(jsdc);
leak:
403 return NULL;
404 }
this arranges to unconditioally free new_url_string:
409 jsdsrc = _addSource( jsdc, new_url_string );
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #465336 -
Flags: review?(cbiesinger)
Attachment #465336 -
Flags: approval2.0?
Comment 2•14 years ago
|
||
Comment on attachment 465336 [details] [diff] [review]
patch
I don't think I'm a good person for this review, sorry.
Attachment #465336 -
Flags: review?(cbiesinger)
Attachment #465336 -
Flags: review?(jorendorff)
Updated•14 years ago
|
Attachment #465336 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #465336 -
Flags: review?(jorendorff) → review+
Attachment #465336 -
Flags: approval2.0?
Comment 3•14 years ago
|
||
Comment on attachment 465336 [details] [diff] [review]
patch
Can we make sure this hasn't bitrotted? Then renominate for approval.
Attachment #465336 -
Flags: approval2.0? → approval2.0-
Comment 4•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
Updated•13 years ago
|
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•