[PATCH 06/11] Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 super-gpt.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/super-gpt.c b/super-gpt.c
index 6f852aa..b8c9aae 100644
--- a/super-gpt.c
+++ b/super-gpt.c
@@ -179,8 +179,10 @@ static struct supertype *match_metadata_desc(char *arg)
 
 	if (!st)
 		return st;
-	if (strcmp(arg, "gpt") != 0)
+	if (strcmp(arg, "gpt") != 0) {
+		free(st);
 		return NULL;
+	}
 
 	st->ss = &gpt;
 	st->info = NULL;
-- 
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux