Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Dec 2015 04:51:21 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r291981 - head/lib/libc/tests/stdio
Message-ID:  <201512080451.tB84pLbX020127@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512080451.tB84pLbX020127>