Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2018 04:08:08 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334016 - head/usr.sbin/bhyve
Message-ID:  <201805220408.w4M4889c020315@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Tue May 22 04:08:08 2018
New Revision: 334016
URL: https://svnweb.freebsd.org/changeset/base/334016

Log:
  We must free the variable str.
  
  Spotted by:	clang's static analyzer
  Submitted by:	Tom Rix <trix_juniper.net>
  Reviewed by:	grehan
  MFC after:	4 weeks
  Sponsored by:	iXsystems Inc.
  Differential Revision:	https://reviews.freebsd.org/D10009

Modified:
  head/usr.sbin/bhyve/pci_emul.c

Modified: head/usr.sbin/bhyve/pci_emul.c
==============================================================================
--- head/usr.sbin/bhyve/pci_emul.c	Tue May 22 03:57:32 2018	(r334015)
+++ head/usr.sbin/bhyve/pci_emul.c	Tue May 22 04:08:08 2018	(r334016)
@@ -231,8 +231,7 @@ pci_parse_slot(char *opt)
 	si->si_funcs[fnum].fi_param = config;
 
 done:
-	if (error)
-		free(str);
+	free(str);
 
 	return (error);
 }



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