mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-04 18:36:02 -05:00
Fix double-free in dispatch.c
This commit is contained in:
parent
90dc66110a
commit
0cbc4a22d6
@ -101,6 +101,12 @@ typedef struct tag_output_info {
|
||||
* do cleanup on the pqi structure... free any allocated memory, etc
|
||||
*/
|
||||
void dispatch_cleanup(DBQUERYINFO *pqi) {
|
||||
if(!pqi)
|
||||
return;
|
||||
|
||||
if(pqi->output_info)
|
||||
free(pqi->output_info);
|
||||
|
||||
if(pqi->pt) {
|
||||
sp_dispose(pqi->pt);
|
||||
}
|
||||
@ -606,8 +612,6 @@ int dispatch_output_end(WS_CONNINFO *pwsc, DBQUERYINFO *pqi) {
|
||||
}
|
||||
|
||||
config_set_status(pwsc,pqi->session_id,NULL);
|
||||
free(poi);
|
||||
free(pqi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user