Opened 16 years ago
#1419 new defect
m_option.c:70: Memory leak: p
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | core |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
In file m_option.c:70 variable p leaks memory if realloc() fails.
Code:
if ((p = realloc (p, size)) == NULL)
return NULL;
If realloc() fails the original block is left untouched; it is not freed or moved.
This bug was found using Cppcheck: http://cppcheck.wiki.sourceforge.net/
Note:
See TracTickets
for help on using tickets.