This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] fix minor leak on a stap error path
- From: Nathan Scott <nathans at redhat dot com>
- To: systemtap at sourceware dot org
- Date: Wed, 9 Jan 2013 17:07:04 -0500 (EST)
- Subject: [PATCH] fix minor leak on a stap error path
- Reply-to: Nathan Scott <nathans at redhat dot com>
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;
}