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

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