#32 [PATCH] Memory leaks

open
nobody
None
5
2012-11-22
2012-11-22
Anonymous
No

A few memory leaks

iodbc/trace/trace.c
----------------------------

MEM_FREE (trace_fname_template)
trace_fname_template = NULL;

needed at the end of

void
trace_set_filename (char *template)
{
...
MEM_FREE (trace_fname_template)
trace_fname_template = NULL;

return;
}

----------------------------

MEM_FREE (trace_fname);
trace_fname = NULL;

needed at the end of

void
trace_stop(void)
{
...
MEM_FREE (trace_fname);
trace_fname = NULL;
}

---------------------------

iodbc/dlproc.c

probably memory leak (never frees)

HDLL
_iodbcdm_dllopen (char *path)
{
...
if ((pDrv = calloc (1, sizeof (dlproc_t))) == NULL)
return NULL;
...
}

Discussion