backupkey: Fix CID 1034885 Resource leak
authorVolker Lendecke <vl@samba.org>
Sun, 10 Nov 2013 18:34:31 +0000 (19:34 +0100)
committerIra Cooper <ira@samba.org>
Mon, 11 Nov 2013 20:04:09 +0000 (21:04 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
source4/rpc_server/backupkey/dcesrv_backupkey.c

index 87799db595e360d7ab72c90348546fb68c610e83..83fb2bdf86ac6cd283d64718b72aa9bfb5725c9d 100644 (file)
@@ -864,6 +864,7 @@ static WERROR self_sign_cert(TALLOC_CTX *ctx, hx509_context *hctx, hx509_request
                talloc_free(uniqueid.data);
                hx509_name_free(&subject);
                free_SubjectPublicKeyInfo(&spki);
+               hx509_ca_tbs_free(&tbs);
                return WERR_INTERNAL_ERROR;
        }
        ret = hx509_ca_tbs_set_subject(*hctx, tbs, subject);