svn commit: r257945 - head/usr.sbin/pkg
Bryan Drewery
bryan at shatow.net
Mon Nov 11 15:35:55 UTC 2013
On Mon, Nov 11, 2013 at 07:44:10AM +0000, Gleb Smirnoff wrote:
> Author: glebius
> Date: Mon Nov 11 07:44:09 2013
> New Revision: 257945
> URL: http://svnweb.freebsd.org/changeset/base/257945
>
> Log:
> Do not use just freed memory.
>
> Sponsored by: Nginx, Inc.
Can you please also MFC this?
>
> Modified:
> head/usr.sbin/pkg/pkg.c
>
> Modified: head/usr.sbin/pkg/pkg.c
> ==============================================================================
> --- head/usr.sbin/pkg/pkg.c Mon Nov 11 06:22:29 2013 (r257944)
> +++ head/usr.sbin/pkg/pkg.c Mon Nov 11 07:44:09 2013 (r257945)
> @@ -323,9 +323,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);
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 964 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131111/4579d4d3/attachment.sig>
More information about the svn-src-head
mailing list