Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib Fix a double free[*]...



details:   https://anonhg.NetBSD.org/src/rev/6db428a2b54a
branches:  trunk
changeset: 760323:6db428a2b54a
user:      agc <agc%NetBSD.org@localhost>
date:      Sun Jan 02 18:13:10 2011 +0000

description:
Fix a double free[*], pointed out by Anthony Bentley.

[*] This was actually a triple free. We go all the way to 11.

diffstat:

 crypto/external/bsd/netpgp/dist/src/lib/crypto.c |  5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r cc3364d26d7f -r 6db428a2b54a crypto/external/bsd/netpgp/dist/src/lib/crypto.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/crypto.c  Sun Jan 02 18:12:01 2011 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/crypto.c  Sun Jan 02 18:13:10 2011 +0000
@@ -54,7 +54,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: crypto.c,v 1.34 2010/11/29 04:20:12 agc Exp $");
+__RCSID("$NetBSD: crypto.c,v 1.35 2011/01/02 18:13:10 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -598,11 +598,8 @@
                pgp_reader_pop_dearmour(parse);
        }
 
-
        /* tidy up */
        pgp_teardown_memory_read(parse, inmem);
-       pgp_memory_release(inmem);
-       free(inmem);
 
        pgp_writer_close(parse->cbinfo.output);
        pgp_output_delete(parse->cbinfo.output);



Home | Main Index | Thread Index | Old Index