svn commit: r291981 - head/lib/libc/tests/stdio

Garrett Cooper ngie at FreeBSD.org
Tue Dec 8 04:51:22 UTC 2015


Author: ngie
Date: Tue Dec  8 04:51:21 2015
New Revision: 291981
URL: https://svnweb.freebsd.org/changeset/base/291981

Log:
  Delete bogus freeing of uninitialized data
  
  MFC after: 3 days
  Reported by: cppcheck
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/stdio/getdelim_test.c

Modified: head/lib/libc/tests/stdio/getdelim_test.c
==============================================================================
--- head/lib/libc/tests/stdio/getdelim_test.c	Tue Dec  8 04:45:44 2015	(r291980)
+++ head/lib/libc/tests/stdio/getdelim_test.c	Tue Dec  8 04:51:21 2015	(r291981)
@@ -207,7 +207,6 @@ ATF_TC_BODY(empty_NULL_buffer, tc)
 
 	/* Make sure NULL *linep and zero *linecapp are handled. */
 	fp = mkfilebuf();
-	free(line);
 	line = NULL;
 	linecap = 42;
 	ATF_REQUIRE(getline(&line, &linecap, fp) == sizeof(apothegm) - 1);


More information about the svn-src-head mailing list