Fix 3 large memory leaks

This commit is contained in:
Ron Pedde 2007-10-29 05:48:42 +00:00
parent e842f38fce
commit f3d1caff93
2 changed files with 8 additions and 1 deletions

View File

@ -291,6 +291,8 @@ EXPORT void pi_db_enum_dispose(char **pe, DB_QUERY *pinfo) {
sp_dispose(pqi->pt); sp_dispose(pqi->pt);
pqi->pt = NULL; pqi->pt = NULL;
} }
free(pqi);
pinfo->priv = NULL;
} }
} }

View File

@ -1088,9 +1088,11 @@ int io_printf(IO_PRIVHANDLE *phandle, char *fmt, ...) {
len = new_size; len = new_size;
if(!io_write(phandle,(unsigned char *)outbuf,&len) || (len != new_size)) { if(!io_write(phandle,(unsigned char *)outbuf,&len) || (len != new_size)) {
free(outbuf);
return FALSE; return FALSE;
} }
free(outbuf);
return TRUE; return TRUE;
} }
@ -2221,6 +2223,9 @@ int io_socket_close(IO_PRIVHANDLE *phandle) {
} }
#endif #endif
free(priv);
phandle->private = NULL;
return TRUE; return TRUE;
} }