lwIP - A Lightweight TCP/IP stack - Tasks: task #15205, memory leak in autoip.c
You are not allowed to post comments on this tracker with your current authentication level.
task #15205: memory leak in autoip.c
Submitter: | zhangyanjiao <anne1993> | ||
Submitted: | Wed 13 Mar 2019 06:21:07 AM UTC | ||
Category: | IPv4 | Should Start On: | Wed 13 Mar 2019 12:00:00 AM UTC |
Should be Finished on: | Wed 13 Mar 2019 12:00:00 AM UTC | Priority: | 5 - Normal |
Status: | Cancelled | Privacy: | Public |
Assigned to: | None | Percent Complete: | 0% |
Open/Closed: | Closed | Planned Release: | None |
Effort: | 0.00 |
Wed 13 Mar 2019 06:52:31 AM UTC, comment #1: |
Simon Goldschmidt <goldsimon> |
Wed 13 Mar 2019 06:21:07 AM UTC, original submission:
When I test the autoip, In find there is memory leak in autoip.c:
|
zhangyanjiao <anne1993> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-03-13 | goldsimon | Status | None | Cancelled | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-f8d8.
Corresponding source code
This should be reported as a 'bug', not a 'task'. Thanks.
And strictly speaking, this is not a memory leak as the memory will not be allocated again when starting autoip again. The memory just stays allocated. This was good enough for embedded targets. It might not be good enough for lwIP used as a library though.
However, your fix doesn't really work as is, as there's the possibility to allocate the struct autoip from static memory (in situations where lwIP has no heap at all). When this is done, you can't just call mem_free on this pointer.