From owner-svn-src-head@FreeBSD.ORG Wed Apr 30 09:58:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BB13343; Wed, 30 Apr 2014 09:58:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 789C919DA; Wed, 30 Apr 2014 09:58:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U9wTu3062779; Wed, 30 Apr 2014 09:58:29 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U9wTkB062778; Wed, 30 Apr 2014 09:58:29 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201404300958.s3U9wTkB062778@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 30 Apr 2014 09:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265145 - head/lib/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 09:58:29 -0000 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) {