Closed Bug 586671 Opened 14 years ago Closed 14 years ago

AffixMgr::parse_convtable leaks pattern/pattern2 if it can't create both

Categories

(Core :: Spelling checker, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- ?

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, memory-leak, Whiteboard: [fixed-in-hunspell-1.2.13])

Attachments

(1 file)

3510 	        char * pattern = NULL;
3511 	        char * pattern2 = NULL;
3512 	        piece = mystrsep(&tp, 0);
3513 	        while (piece) {
...
3525 	                  case 1: { pattern = mystrrep(mystrdup(piece),"_"," "); break; }
3526 	                  case 2: { 
3527 	                    pattern2 = mystrrep(mystrdup(piece),"_"," ");
...
3535 	        }
3536 	        if (!pattern || !pattern2) {
3537 	             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
leaks pattern or pattern2:
3538 	             return 1;
3539 	        }
Attached patch patchSplinter Review
please note that this file does not have anything resembling an indentation style.
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #465281 - Flags: review?(ryanvm)
Attachment #465281 - Flags: review?(ryanvm) → review?(caolanm)
patch now committed to upstream hunspell
don't seem to have sufficient mojo to set patch review flag to +
Attachment #465281 - Flags: review?(caolanm) → review+
Whiteboard: [fixed-in-hunspell-1.2.13]
re comment 3: fixed; mojo granted :)
Attachment #465281 - Flags: approval2.0?
Whiteboard: [fixed-in-hunspell-1.2.13] → [fixed-in-hunspell-1.2.13][needs landing]
Keywords: checkin-needed
Pushed http://hg.mozilla.org/mozilla-central/rev/aacc3b418049
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
status1.9.2: --- → ?
Whiteboard: [fixed-in-hunspell-1.2.13][needs landing] → [fixed-in-hunspell-1.2.13]
I think you need to request branch approval, Ryan, if you want this on 1.9.2.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: