Parfait analysis errors
Parfait reports some errors (e.g. memory leaks, unclosed file descriptor) in Lighttpd version 1.4.33, an attached patch file will fix them.
#1 Updated by kukackajiri about 3 years ago
- File src_array.c.patchView added
- File src_configfile.c.patchView added
- File src_fdevent.c.patchView added
- File src_lemon.c.patchView added
- File src_lempar.c.patchView added
- File src_mod_mysql_vhost.c.patchView added
- File src_mod_webdav.c.patchView added
Update - I split patch file into smaller patches for easier comments. They are named by file they patch, as there is no dependency between them.
#3 Updated by stbuehler about 3 years ago
- mod_webdav fd leak: this is a real one, although if opening the upload tmpfiles fails we are screwed anyway.
- mod_mysql_vhost: leak on config init, looks like one buffer per block. also leaks in "non error" cases.
- lemon.c: don't care, it's just the parser generator
- fdevent.c: misses the error cases. already fixed in svn (found with clang analyzer)
- array.c/array_replace: du is not allowed to be NULL (maybe add assert())
- configfile.c array_insert_unique() call: if array_insert_unique fails here there are deeper problems.. the keys are supposed to be unique in that stage. (maybe add assert())
- configfile.c modules/prepends NULL checks: i'd rather have a segfault if this happens (maybe add assert())
- parfait annotations: as i already said, i'm not applying those
The problem with assert() is that it could be optimized away, so we can't do anything "real" in the standard assert() (only boolean checks without side effects).
Also available in: Atom