[pipe] Fix minor memleak

This commit is contained in:
ejurgensen 2017-02-10 23:03:38 +01:00
parent 13e6889990
commit d8255e1d08
1 changed files with 5 additions and 3 deletions

View File

@ -801,10 +801,12 @@ stop(struct player_source *ps)
// Reset the pipe and start watching it again for new data. Must be async or
// we will deadlock from the stop in pipe_read_cb().
if (pipe_autostart)
{
id = malloc(sizeof(int));
*id = pipe->id;
if (pipe_autostart)
commands_exec_async(cmdbase, pipe_watch_reset, id);
}
if (pipe_metadata)
worker_execute(pipe_metadata_watch_del, NULL, 0, 0);