apache
No call to the free function when !SHARED_MODULE.
Apache has some functions responsible to clean things up. Some of these functions were called within feature SHARED_MODULE. SHARED_MODULE is no longer defined, so they were leaking.
Bug fixed by commit 2a6cbfa00e0
| Type | MemoryLeak |
| Config | "!SHARED_MODULE" (1st degree) |
| Fix-in | mapping |
| Location | modules/ssl/ |
#include <stdlib.h>
#include <string.h>
void ssl_init_ModuleKill()
{
char *sc = malloc(sizeof(char) * 45);
// code making use of 'sc'
strcpy(sc, "something");
#ifdef SHARED_MODULE
free(sc);
#endif
// return having forgotten to free the memory
return;
}
int main(void)
{
ssl_init_ModuleKill();
return 0;
}
. call modules/ssl/ssl_engine_init.c:965:ssl_init_ModuleKill() . // if SHARED_MODULE is disabled . ERROR 1021: return APR_SUCCESS;