From 18a043f37f8c5aa463a60103aad26f530873cc7a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 25 Mar 2022 12:29:41 +0100 Subject: [PATCH] iio: Fix leak in buffer_drv_data_free() From Coverity: iio-sensor-proxy-3.3/src/iio-buffer-utils.c:769: noescape: Resource "buffer_data" is not freed or pointed-to in "buffer_drv_data_free". iio-sensor-proxy-3.3/src/iio-buffer-utils.c:770:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'buffer_data' --- src/iio-buffer-utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iio-buffer-utils.c b/src/iio-buffer-utils.c index c8f859a..8a6a779 100644 --- a/src/iio-buffer-utils.c +++ b/src/iio-buffer-utils.c @@ -738,6 +738,7 @@ buffer_drv_data_free (BufferDrvData *buffer_data) for (i = 0; i < buffer_data->channels_count; i++) channel_info_free (buffer_data->channels[i]); g_free (buffer_data->channels); + g_free (buffer_data); } BufferDrvData *