Opened 11 years ago
Closed 11 years ago
#10229 closed bug (fixed)
Fixed resource leak in Terminal CID: 702031
Reported by: | Ezodev | Owned by: | jackburton |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Terminal | Version: | R1/Development |
Keywords: | gci2013 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
As in summary.
Attachments (4)
Change History (10)
by , 11 years ago
Attachment: | 0001-Fixed-resource-leak-CID-702031.patch added |
---|
comment:1 by , 11 years ago
patch: | 0 → 1 |
---|
by , 11 years ago
Attachment: | 0001-Fixed-resource-leak-CID-702031.2.patch added |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Yes, there is leak. But in this patch I've freed it unconditionaly above. But, I've forgotten about deleting one more call to close, I will add fixed patch now.
by , 11 years ago
Attachment: | resleak-702031.patch added |
---|
comment:4 by , 11 years ago
Once again, master is used at line 621, so there is no reason to close it unconditionally before that.
Coverity said the same BTW:
617 21. Condition "done <= 0", taking true branch 618 if (done <= 0) CID undefined (#2 of 2): Resource leak (RESOURCE_LEAK)22. leaked_handle: Handle variable "master" going out of scope leaks the handle. 619 return B_ERROR;
by , 11 years ago
Attachment: | 0001-Fixed-resource-leak-CID-702031.3.patch added |
---|
comment:5 by , 11 years ago
Sorry, I haven't noticed that assigment at the end. I thinked that it is unused from the moment when I closed it.
Note:
See TracTickets
for help on using tickets.
Did you actually test your patch? I think the leak is at http://cgit.haiku-os.org/haiku/tree/src/apps/terminal/Shell.cpp#n619