[PATCH] backupkey: Fix CID 1338078 (RESOURCE_LEAK)

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 3 11:02:42 UTC 2015


Hi!

Review&push appreciated!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

Besuchen Sie uns vom 10.-11.11.15 auf der ISSE!
Information Security Solutions Europe Conference
Hotel Palace Berlin, 20%-Rabattcode: "ISSE15SP"

Meet us at Information Security Conference ISSE!
November 10th - 11th 2015 in Hotel Palace Berlin
For 20% discount take voucher code:  "ISSE15SP"
-------------- next part --------------
From 29b1e69b9a1cccb87ed19f90c524461b2889ec52 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 3 Nov 2015 12:00:56 +0100
Subject: [PATCH] backupkey: Fix CID 1338078 (RESOURCE_LEAK)

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source4/rpc_server/backupkey/dcesrv_backupkey.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source4/rpc_server/backupkey/dcesrv_backupkey.c b/source4/rpc_server/backupkey/dcesrv_backupkey.c
index 3edd1b6..ccd95d2 100644
--- a/source4/rpc_server/backupkey/dcesrv_backupkey.c
+++ b/source4/rpc_server/backupkey/dcesrv_backupkey.c
@@ -312,6 +312,7 @@ static NTSTATUS get_pk_from_raw_keypair_params(TALLOC_CTX *ctx,
 	ops = hx509_find_private_alg(&_hx509_signature_rsa_with_var_num.algorithm);
 	if (ops == NULL) {
 		DEBUG(2, ("Not supported algorithm\n"));
+		hx509_context_free(&hctx);
 		return NT_STATUS_INTERNAL_ERROR;
 	}
 
-- 
1.9.1



More information about the samba-technical mailing list