]> git.baikalelectronics.ru Git - kernel.git/commit
PKCS#7: Fix the parser cleanup to drain parsed out X.509 certs
authorDavid Howells <dhowells@redhat.com>
Tue, 16 Sep 2014 16:29:03 +0000 (17:29 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 16 Sep 2014 16:29:03 +0000 (17:29 +0100)
commit9b4ff1d9599fd7478d7787e5399e35b5fe1e6415
tree098624f09f316276da0d4f26d006b8d6ff4b41c0
parent90c39d9dfa8bdd676864bdf8914a5ee0c1de17b0
PKCS#7: Fix the parser cleanup to drain parsed out X.509 certs

Fix the parser cleanup code to drain parsed out X.509 certs in the case that
the decode fails and we jump to error_decode.

The function is rearranged so that the same cleanup code is used in the success
case as the error case - just that the message descriptor under construction is
only released if it is still pointed to by the context struct at that point.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
crypto/asymmetric_keys/pkcs7_parser.c