From bbf84f408869af03e99f8f28334a571f1ca95851 Mon Sep 17 00:00:00 2001 From: Mike Jumper Date: Mon, 16 Oct 2023 09:03:03 -0700 Subject: [PATCH] GUACAMOLE-1867: Migrate PulseAudio convenience library to new memory management functions. --- src/pulse/pulse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pulse/pulse.c b/src/pulse/pulse.c index 2f30b1af..48d79269 100644 --- a/src/pulse/pulse.c +++ b/src/pulse/pulse.c @@ -22,6 +22,7 @@ #include "pulse/pulse.h" #include +#include #include #include #include @@ -312,7 +313,7 @@ guac_pa_stream* guac_pa_stream_alloc(guac_client* client, return NULL; /* Init main loop */ - guac_pa_stream* stream = malloc(sizeof(guac_pa_stream)); + guac_pa_stream* stream = guac_mem_alloc(sizeof(guac_pa_stream)); stream->client = client; stream->audio = audio; stream->pa_mainloop = pa_threaded_mainloop_new(); @@ -347,7 +348,7 @@ void guac_pa_stream_free(guac_pa_stream* stream) { /* Stream now ended */ guac_client_log(stream->client, GUAC_LOG_INFO, "Audio stream finished"); - free(stream); + guac_mem_free(stream); }