Date: Thu, 14 Nov 2013 09:26:52 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258126 - stable/10/usr.sbin/pkg Message-ID: <201311140926.rAE9QqV0044027@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Nov 14 09:26:52 2013 New Revision: 258126 URL: http://svnweb.freebsd.org/changeset/base/258126 Log: Merge r257945 from head: Do not use just freed memory. Approved by: re (kib) Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/usr.sbin/pkg/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Thu Nov 14 09:25:29 2013 (r258125) +++ stable/10/usr.sbin/pkg/pkg.c Thu Nov 14 09:26:52 2013 (r258126) @@ -326,9 +326,9 @@ parse_fingerprint(yaml_document_t *doc, static void free_fingerprint_list(struct fingerprint_list* list) { - struct fingerprint* fingerprint; + struct fingerprint *fingerprint, *tmp; - STAILQ_FOREACH(fingerprint, list, next) { + STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) { if (fingerprint->name) free(fingerprint->name); free(fingerprint);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311140926.rAE9QqV0044027>