Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 09:58:29 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265145 - head/lib/libcapsicum
Message-ID:  <201404300958.s3U9wTkB062778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Apr 30 09:58:28 2014
New Revision: 265145
URL: http://svnweb.freebsd.org/changeset/base/265145

Log:
  Don't forget to remember previous element at the end of the loop.
  
  Reported by:	brueffer
  Found with:	Coverity Prevent(tm)
  CID:		1135301

Modified:
  head/lib/libcapsicum/libcapsicum_dns.c

Modified: head/lib/libcapsicum/libcapsicum_dns.c
==============================================================================
--- head/lib/libcapsicum/libcapsicum_dns.c	Wed Apr 30 09:57:38 2014	(r265144)
+++ head/lib/libcapsicum/libcapsicum_dns.c	Wed Apr 30 09:58:28 2014	(r265145)
@@ -247,6 +247,7 @@ cap_getaddrinfo(cap_channel_t *chan, con
 			prevai->ai_next = curai;
 		else if (firstai == NULL)
 			firstai = curai;
+		prevai = curai;
 	}
 	nvlist_destroy(nvl);
 	if (curai == NULL && nvlai != NULL) {



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