Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2017 08:22:01 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318181 - head/contrib/libarchive/cpio/test
Message-ID:  <201705110822.v4B8M10n021961@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Thu May 11 08:22:01 2017
New Revision: 318181
URL: https://svnweb.freebsd.org/changeset/base/318181

Log:
  cpio/tests/test_option_lz4: fix a use after free in the failure case
  
  This change will be upstreamed to the libarchive project.
  
  MFC after:	6 days
  MFC with:	r317782
  Reported by:	Coverity
  Sponsored by:	Dell EMC Isilon

Modified:
  head/contrib/libarchive/cpio/test/test_option_lz4.c

Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c
==============================================================================
--- head/contrib/libarchive/cpio/test/test_option_lz4.c	Thu May 11 08:06:46 2017	(r318180)
+++ head/contrib/libarchive/cpio/test/test_option_lz4.c	Thu May 11 08:22:01 2017	(r318181)
@@ -74,8 +74,8 @@ DEFINE_TEST(test_option_lz4)
 			free(p);
 			return;
 		}
-		free(p);
 		failure("--lz4 option is broken: %s", p);
+		free(p);
 		assertEqualInt(r, 0);
 		return;
 	}



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