summaryrefslogtreecommitdiff
path: root/debian/patches/0030-Coverity-Resource-leak-fix-return-without-free.patch
blob: dd7a10f7b0630ad87c82b620f3e70a8397752594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 4a670aabdcf6b7870aaa0088574a62603bb22f31 Mon Sep 17 00:00:00 2001
From: Anthony Youngman <anthony@youngman.org.uk>
Date: Fri, 15 Jun 2018 22:18:14 +0100
Subject: [PATCH 30/40] Coverity: Resource leak: fix return without free

Signed-off-by: Anthony Youngman <anthony@youngman.org.uk>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
 Assemble.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Assemble.c b/Assemble.c
index 5a907c14..0a7ab6f5 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -281,6 +281,8 @@ static int select_devices(struct mddev_dev *devlist,
 				st->ss->free_super(st);
 			dev_policy_free(pol);
 			domain_free(domains);
+			if (tst)
+				tst->ss->free_super(tst);
 			return -1;
 		}
 
-- 
2.17.1