Source-Changes-HG archive

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

[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon fixed some memory leaks d...



details:   https://anonhg.NetBSD.org/src/rev/f1d920356a19
branches:  trunk
changeset: 762833:f1d920356a19
user:      vanhu <vanhu%NetBSD.org@localhost>
date:      Wed Mar 02 14:49:21 2011 +0000

description:
fixed some memory leaks during configuration parsing. patch by Roman Hoog Antink <rha%open.ch@localhost>

diffstat:

 crypto/dist/ipsec-tools/src/racoon/cfparse.y  |  5 ++++-
 crypto/dist/ipsec-tools/src/racoon/prsa_par.y |  5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (59 lines):

diff -r 44efcd88c176 -r f1d920356a19 crypto/dist/ipsec-tools/src/racoon/cfparse.y
--- a/crypto/dist/ipsec-tools/src/racoon/cfparse.y      Wed Mar 02 13:26:41 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cfparse.y      Wed Mar 02 14:49:21 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cfparse.y,v 1.39 2011/03/01 14:14:50 vanhu Exp $       */
+/*     $NetBSD: cfparse.y,v 1.40 2011/03/02 14:49:21 vanhu Exp $       */
 
 /* Id: cfparse.y,v 1.66 2006/08/22 18:17:17 manubsd Exp */
 
@@ -423,13 +423,16 @@
        :       X_ISAKMP ike_addrinfo_port
                {
                        myaddr_listen($2, FALSE);
+                       racoon_free($2);
                }
                EOS
        |       X_ISAKMP_NATT ike_addrinfo_port
                {
 #ifdef ENABLE_NATT
                        myaddr_listen($2, TRUE);
+                       racoon_free($2);
 #else
+                       racoon_free($2);
                        yyerror("NAT-T support not compiled in.");
 #endif
                }
diff -r 44efcd88c176 -r f1d920356a19 crypto/dist/ipsec-tools/src/racoon/prsa_par.y
--- a/crypto/dist/ipsec-tools/src/racoon/prsa_par.y     Wed Mar 02 13:26:41 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/prsa_par.y     Wed Mar 02 14:49:21 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prsa_par.y,v 1.5 2011/02/10 11:17:17 tteras Exp $      */
+/*     $NetBSD: prsa_par.y,v 1.6 2011/03/02 14:49:21 vanhu Exp $       */
 
 /* Id: prsa_par.y,v 1.3 2004/11/08 12:04:23 ludvigm Exp */
 
@@ -211,6 +211,7 @@
                        YYABORT;
                }
                $$ = base64_pubkey2rsa($2);
+               free($2);
        }
        | TAG_PUB HEX
        {
@@ -256,6 +257,7 @@
                }
                memcpy(sap, res->ai_addr, res->ai_addrlen);
                freeaddrinfo(res);
+               free($1);
        }
        ;
 
@@ -284,6 +286,7 @@
                }
                memcpy(sap, res->ai_addr, res->ai_addrlen);
                freeaddrinfo(res);
+               free($1);
        }
        ;
 



Home | Main Index | Thread Index | Old Index