Actions
Feature #2735
open104: All allocated memory should be freed on module uploading
Start date:
04/10/2012
Due date:
% Done:
0%
Estimated time:
Published in build:
Description
- At the end all allocated memory should be free.
- It’s not allowed to free the same memory twice.
- It’s not allowed to free not allocated memory.
Description
The dynamic allocation is widely used in Linux. The incorrect usage of heap may lead to memory leaks or even to failures, when the module tries to free not allocated memory. So, the correct usage of heap includes- Freeing all allocated memory to avoid a memory leak.
- Freeing an allocated memory only once.
- Freeing only allocated memory.
Memory allocation functions are kmalloc and kzalloc, a free function is kfree. It is correct to free the null pointer.
Links
Sample bugfix
Note
This is a generic:resource:leaks class of our classifier.
Files
Updated by Evgeny Novikov over 12 years ago
Commit dd002ee of the master branch adds support of 104_1a model that finds a bug fixed in commit c0cc359 of the linux-stable branch before the fix and... after the fix.
Updated by Evgeny Novikov over 12 years ago
- File 104_1a.patch 104_1a.patch added
To find exactly the same bug as fixed in commit c0cc359 one should apply the patch attached.
Updated by Evgeny Novikov over 12 years ago
Also simple workaround required to detect the bug was added since commit c71d7a4 of our master branch.
Updated by Alexey Khoroshilov over 12 years ago
- Subject changed from All allocated memory should be freed on module uploading to 104: All allocated memory should be freed on module uploading
Updated by Evgeny Novikov over 12 years ago
Reduce priority until we'll decide that it's high actually.
Updated by Evgeny Novikov over 12 years ago
- Priority changed from High to Normal
Updated by Pavel Andrianov about 10 years ago
- Description updated (diff)
- Assignee changed from Evgeny Novikov to Pavel Andrianov
Actions