From 7207d9d0e5e88ccfb32f928f9a4b61482c64c572 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 6 Jun 2024 13:05:16 -0400 Subject: [PATCH] MT#60258 prevent possible null dereference Change-Id: I8e661067d83c3a292f2ec43cd7fd129d8e3f01a7 (cherry picked from commit bee6275cf9e054267a9edb94da77accacdbcbb51) --- recording-daemon/metafile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 4ada3b7964..4cc5ed1119 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -52,6 +52,8 @@ static void meta_destroy(metafile_t *mf) { // close all streams for (int i = 0; i < mf->streams->len; i++) { stream_t *stream = g_ptr_array_index(mf->streams, i); + if (!stream) + continue; pthread_mutex_lock(&stream->lock); stream_close(stream); pthread_mutex_unlock(&stream->lock);