From cad7db9f58f7df22251353d05deecf1accb65298 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 5 Sep 2022 09:25:14 +0200 Subject: [PATCH] libcamera: close camera in error path --- spa/plugins/libcamera/libcamera-utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/libcamera/libcamera-utils.cpp b/spa/plugins/libcamera/libcamera-utils.cpp index c070e1f60..99d067254 100644 --- a/spa/plugins/libcamera/libcamera-utils.cpp +++ b/spa/plugins/libcamera/libcamera-utils.cpp @@ -417,7 +417,7 @@ static int spa_libcamera_set_format(struct impl *impl, struct port *port, port->streamConfig = impl->config->at(0); if ((res = allocBuffers(impl, port, port->streamConfig.bufferCount)) < 0) - return res; + goto error; port->have_format = true;