Skip to content

Commit 2d5cad4

Browse files
committed
Fix memory leak in Pulse::get_default_sink()
1 parent 61da131 commit 2d5cad4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Pulse.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ std::string Pulse::get_default_sink(){
106106
throw std::runtime_error(msg.str());
107107
}
108108

109+
pa_context_disconnect(context);
110+
pa_context_unref(context);
109111
pa_mainloop_free(mainloop);
110112
return device;
111113
}

0 commit comments

Comments
 (0)