Blame SOURCES/hdparm-9.54-resourceleak-fixes-2.patch

8ad26e
diff -up hdparm-9.54/hdparm.c.bak hdparm-9.54/hdparm.c
8ad26e
--- hdparm-9.54/hdparm.c.bak	2020-06-01 17:56:47.257520643 +0200
8ad26e
+++ hdparm-9.54/hdparm.c	2020-06-01 17:57:29.285084217 +0200
8ad26e
@@ -461,12 +461,15 @@ static void dump_identity (__u16 *idw)
8ad26e
 {
8ad26e
 	int i;
8ad26e
 	char pmodes[64] = {0,}, dmodes[128]={0,}, umodes[128]={0,};
8ad26e
-	char *model = strip(strndup((char *)&idw[27], 40));
8ad26e
-	char *fwrev = strip(strndup((char *)&idw[23],  8));
8ad26e
-	char *serno = strip(strndup((char *)&idw[10], 20));
8ad26e
+	char *model = strndup((char *)&idw[27], 40);
8ad26e
+	char *model_s = strip(model);
8ad26e
+	char *fwrev = strndup((char *)&idw[23],  8);
8ad26e
+	char *fwrev_s = strip(fwrev);
8ad26e
+	char *serno = strndup((char *)&idw[10], 20);
8ad26e
+	char *serno_s = strip(serno);
8ad26e
 	__u8 tPIO;
8ad26e
 
8ad26e
-	printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s", model, fwrev, serno);
8ad26e
+	printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s", model_s, fwrev_s, serno_s);
8ad26e
 	printf("\n Config={");
8ad26e
 	for (i = 0; i <= 15; i++) {
8ad26e
 		if (idw[0] & (1<