Status

()

Core
JavaScript Engine
P3
major
VERIFIED FIXED
18 years ago
16 years ago

People

(Reporter: Bruce Mitchener, Assigned: Bruce Mitchener)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

18 years ago
In js_SetupLocks:
    _global_locks = (PRLock**)malloc(_nr_of_globals * sizeof(PRLock*));
    JS_ASSERT(_global_locks != NULL);
    for (i=0; i<_nr_of_globals; i++) {
        _global_locks[i] = PR_NewLock();
        JS_ASSERT(_global_locks[i] != NULL);
    }

In js_CleanupLocks:
    if (_global_locks != NULL) {
        for (i=0; i<_nr_of_globals; i++) {
            PR_DestroyLock(_global_locks[i]);
            deleteListOfFatlocks(_fl_tables[i].free);
            _fl_tables[i].free = NULL;
            deleteListOfFatlocks(_fl_tables[i].taken);
            _fl_tables[i].taken = NULL;
        }
        _global_locks = NULL;

aren't we missing a free(_global_locks) here?
(Assignee)

Comment 1

18 years ago
Created attachment 5585 [details] [diff] [review]
Fixes memory leak
(Assignee)

Comment 2

18 years ago
I'll take this on to get the fix committed.
Assignee: rogerl → bruce
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
r=shaver
(Assignee)

Comment 4

18 years ago
Fix checked into tip.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

18 years ago
This is fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.