Open Bug 1020565 Opened 7 years ago Updated 3 years ago

ICUService::getKey leaks |idToCache| if |isBogus|


(Core :: JavaScript: Internationalization API, defect)

Not set




(Reporter: mccr8, Unassigned)


(Blocks 1 open bug)


(Keywords: coverity, memory-leak, Whiteboard: [CID 1158226])

It should call |delete| on |idToCache| if it isn't null.

            UnicodeString* idToCache = new UnicodeString(currentDescriptor);
            if (idToCache == NULL || idToCache->isBogus()) {
                status = U_MEMORY_ALLOCATION_ERROR;
                return NULL;
Whiteboard: [CID 1158226] → [CID 1158226] [mentor=mccr8] [good first bug]
We should fix this upstream in ICU, and then downstream the fix, I guess.

Source location is at in our ICU import, and in the upstream source.
There's a bajillion Coverity warnings for ICU, FYI.
Mentor: continuation
Whiteboard: [CID 1158226] [mentor=mccr8] [good first bug] → [CID 1158226] [good first bug]
I'm removing the mentor stuff here because Waldo points out that actually dealing with all the upstreaming stuff for ICU will probably be a pain.
Mentor: continuation
Whiteboard: [CID 1158226] [good first bug] → [CID 1158226]
You need to log in before you can comment on or make changes to this bug.