View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001214 | unreal | ircd | public | 2003-08-28 08:07 | 2003-11-20 19:43 |
| Reporter | AngryWolf | Assigned To | syzop | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.2-beta17 | ||||
| Summary | 0001214: Memory leak in _conf_ban() | ||||
| Description | In s_conf.c in _conf_ban(), memory is allocated for ca, but if a module sets up a hook for CONFIG_BAN (HOOKTYPE_CONFIG_RUN), ca is never freed up (due to a "return 0;"). | ||||
| Attached Files | ban_test.c (2,702 bytes) | ||||
| 3rd party modules | |||||
|
|
Yeah but you should set up 2 hooks, one for config run and one for config test... this only happends if there's a hook for HOOKTYPE_CONFIGTEST and not for HOOKTYPE_CONFIG_RUN, right? The testing takes place @test, and then everything is assumed to be correct so almost no error checking is done @run. |
|
|
No, I have both hooks, and my new ban block keeps eating my memory. Should I send you an example? Uploaded ban_test.c |
|
|
(confirmed) Oh I thought you ment it allocs but if the module doesn't use it, it just returns instead of freeing, but it's rather "it allocs and should always free it when it reaches that else { } thing where modules are checked", I thought 'ca' was passed :p... |
|
|
Yeah, passing that 'ca' somehow to the config run function could be useful for module coders, because you didn't have to use a separate ConfigItem_ban structure list; and it came up in my mind when reported this bug, however I thought you doesn't agree with this. It's good to see it's not precisely so :) |
|
|
Fixed in .1891 (added a free()). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2003-08-28 08:07 | AngryWolf | New Issue | |
| 2003-08-29 01:33 | syzop | Note Added: 0003531 | |
| 2003-08-29 04:39 | AngryWolf | File Added: ban_test.c | |
| 2003-08-29 04:39 | AngryWolf | Note Added: 0003532 | |
| 2003-08-29 13:43 | syzop | Note Added: 0003535 | |
| 2003-08-29 19:16 | AngryWolf | Note Added: 0003538 | |
| 2003-08-31 18:36 | syzop | Status | new => resolved |
| 2003-08-31 18:36 | syzop | Resolution | open => fixed |
| 2003-08-31 18:36 | syzop | Assigned To | => syzop |
| 2003-08-31 18:36 | syzop | Note Added: 0003557 | |
| 2003-11-20 19:43 | syzop | Status | resolved => closed |