diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp
index d076e964a..df0ad00ac 100644
--- a/src/apps/lc-compliance/helpers/capture.cpp
+++ b/src/apps/lc-compliance/helpers/capture.cpp
@@ -21,6 +21,7 @@ Capture::Capture(std::shared_ptr<Camera> camera)
 Capture::~Capture()
 {
 	stop();
+	unconfigure();
 }
 
 void Capture::configure(libcamera::Span<const libcamera::StreamRole> roles)
@@ -50,6 +51,20 @@ void Capture::configure(libcamera::Span<const libcamera::StreamRole> roles)
 	ASSERT_EQ(config->validate(), CameraConfiguration::Valid);
 	ASSERT_EQ(camera_->configure(config.get()), 0);
 
+	const auto bufferCount = config->at(0).bufferCount;
+
+	for (const auto &cfg : *config) {
+		Stream *stream = cfg.stream();
+
+		ASSERT_GE(allocator_.allocate(stream), 0)
+			<< "Failed to allocate buffers";
+
+		ASSERT_EQ(allocator_.buffers(stream).size(), bufferCount)
+			<< "Mismatching buffer count";
+	}
+
+	ASSERT_TRUE(allocator_.allocated());
+
 	config_ = std::move(config);
 }
 
@@ -112,7 +127,7 @@ void Capture::start()
 {
 	assert(config_);
 	assert(!config_->empty());
-	assert(!allocator_.allocated());
+	assert(allocator_.allocated());
 	assert(requests_.empty());
 
 	const auto bufferCount = config_->at(0).bufferCount;
@@ -132,9 +147,6 @@ void Capture::start()
 	for (const auto &cfg : *config_) {
 		Stream *stream = cfg.stream();
 
-		int count = allocator_.allocate(stream);
-		ASSERT_GE(count, 0) << "Failed to allocate buffers";
-
 		const auto &buffers = allocator_.buffers(stream);
 		ASSERT_EQ(buffers.size(), bufferCount) << "Mismatching buffer count";
 
@@ -144,8 +156,6 @@ void Capture::start()
 		}
 	}
 
-	ASSERT_TRUE(allocator_.allocated());
-
 	camera_->requestCompleted.connect(this, &Capture::requestComplete);
 
 	ASSERT_EQ(camera_->start(), 0) << "Failed to start camera";
@@ -161,6 +171,12 @@ void Capture::stop()
 	camera_->requestCompleted.disconnect(this);
 
 	requests_.clear();
+}
+
+void Capture::unconfigure()
+{
+	if (!config_ || !allocator_.allocated())
+		return;
 
 	for (const auto &cfg : *config_) {
 		EXPECT_EQ(allocator_.free(cfg.stream()), 0)
diff --git a/src/apps/lc-compliance/helpers/capture.h b/src/apps/lc-compliance/helpers/capture.h
index ea01c11c1..41ce4e5a6 100644
--- a/src/apps/lc-compliance/helpers/capture.h
+++ b/src/apps/lc-compliance/helpers/capture.h
@@ -28,6 +28,7 @@ private:
 
 	void start();
 	void stop();
+	void unconfigure();
 
 	int queueRequest(libcamera::Request *request);
 	void requestComplete(libcamera::Request *request);
