This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix minor leak on a stap error path


Attached patch frees up an overlooked NSS/SSL-related SECItem
resource on an obscure (OOM) error handling path.

Reviewed-by: Dave Brolley <brolley@redhat.com>
diff --git a/csclient.cxx b/csclient.cxx
index 19948b0..5b00f69 100644
--- a/csclient.cxx
+++ b/csclient.cxx
@@ -361,6 +361,7 @@ badCertHandler(void *arg, PRFileDesc *sslSocket)
       if (! tmpArena) 
 	{
 	  fprintf (stderr, _("Out of memory\n"));
+	  SECITEM_FreeItem(& subAltName, PR_FALSE);
 	  secStatus = SECSuccess; /* Not a fatal error here */
 	  break;
 	}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]