[PATCH 4/8] rt-tests: pi_stress: Don't call free on alloca

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

 



strdupa uses alloca to allocate the buffer
free should not be used on space allocated with alloca,
so remove these.

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
 src/pi_tests/pi_stress.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index 53c6af15afac..3888198f395b 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c
@@ -1259,10 +1259,8 @@ int process_sched_line(const char *arg)
 		k = strsep(&buf, del);
 	}
 
-	if (!id) {
-		free(buf);
+	if (!id)
 		return FAILURE;
-	}
 
 	/* We do not validate the options, instead we pass all garbage
 	 * to the kernel and see what's happening */
@@ -1280,7 +1278,6 @@ int process_sched_line(const char *arg)
 		retval = FAILURE;
 	}
 
-	free(buf);
 	return retval;
 }
 
-- 
2.31.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux