From 94df75cdeb58795069ffa1c0b8bcb9e3618fbf74 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Tue, 11 Jun 2019 04:57:44 -0400 Subject: [PATCH] Close ctrl device in error path --- casadm/statistics_model.c | 1 + 1 file changed, 1 insertion(+) diff --git a/casadm/statistics_model.c b/casadm/statistics_model.c index b98a9eb..9cb03e1 100644 --- a/casadm/statistics_model.c +++ b/casadm/statistics_model.c @@ -1171,6 +1171,7 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id, if (create_pipe_pair(intermediate_file)) { cas_printf(LOG_ERR,"Failed to create unidirectional pipe.\n"); + close(ctrl_fd); return FAILURE; }