From 3f89850f55cd7312057a2dcd5aec5ecd2c0a8ef0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 4 Sep 2024 08:01:41 -0400 Subject: [PATCH] MT#60853 fix possible null dereference Change-Id: I9d6b96ed10bab0055aa217fd976335a2e0919b56 (cherry picked from commit 3e0b30219d8aa657c52047a7727a9ed6220af35e) (cherry picked from commit c85596a7e1b33938f52939878b4a389465658583) (cherry picked from commit 0af3750f926513a9b6876f0d7a9904cfeacffbc2) --- recording-daemon/metafile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 0b4763b492..85cc38ef10 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -34,6 +34,8 @@ static void meta_free(void *ptr) { g_clear_pointer(&mf->ssrc_hash, g_hash_table_destroy); for (int i = 0; i < mf->streams->len; i++) { stream_t *stream = g_ptr_array_index(mf->streams, i); + if (!stream) + continue; stream_close(stream); // should be closed already stream_free(stream); }