mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05:00
Fix 3 large memory leaks
This commit is contained in:
parent
e842f38fce
commit
f3d1caff93
@ -291,6 +291,8 @@ EXPORT void pi_db_enum_dispose(char **pe, DB_QUERY *pinfo) {
|
||||
sp_dispose(pqi->pt);
|
||||
pqi->pt = NULL;
|
||||
}
|
||||
free(pqi);
|
||||
pinfo->priv = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
7
src/io.c
7
src/io.c
@ -1088,9 +1088,11 @@ int io_printf(IO_PRIVHANDLE *phandle, char *fmt, ...) {
|
||||
|
||||
len = new_size;
|
||||
if(!io_write(phandle,(unsigned char *)outbuf,&len) || (len != new_size)) {
|
||||
free(outbuf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
free(outbuf);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2221,6 +2223,9 @@ int io_socket_close(IO_PRIVHANDLE *phandle) {
|
||||
}
|
||||
#endif
|
||||
|
||||
free(priv);
|
||||
phandle->private = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2314,7 +2319,7 @@ int io_socket_write(IO_PRIVHANDLE *phandle, unsigned char *buf,uint32_t *len) {
|
||||
#ifdef WIN32
|
||||
if(WSAGetLastError() == WSAEWOULDBLOCK) {
|
||||
byteswritten = 0;
|
||||
|
||||
|
||||
if(priv->hEvent) {
|
||||
WSAEventSelect(priv->fd,(WSAEVENT)priv->hEvent,0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user