diff options
author | lloyd <[email protected]> | 2008-12-12 17:41:47 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-12-12 17:41:47 +0000 |
commit | 05134b3f0a8589410e09c463a9866a8b40e5c3e9 (patch) | |
tree | 6404a5e790c24496372b4dc0bc18417327268488 /src/entropy/unix_procs | |
parent | e41b96f756ac44f700ce70b30c57bfc4dd037537 (diff) |
Fix a memory leak in PKCS #8 load_key and encrypt_key that would
occur because PKCS #5 v2.0 doesn't support empty passphrases (though
maybe it should?). In this case pbe->set_key would throw an exception,
causing the stack to be unwound without the (dynamically created) PBE
object being deleted. Use auto_ptr to hold the PBE*, then .release()
it when passing it to the Pipe (since Pipe takes ownership of its Filters).
Noticed when looking at valgrind analysis of monotone's sync command.
Diffstat (limited to 'src/entropy/unix_procs')
0 files changed, 0 insertions, 0 deletions