summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-08-28 09:05:36 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-08-28 09:05:36 -0400
commit1bdccb84fd4ea7ec3fc818d049b7b6ae317f74bc (patch)
tree731a8560704dd084a77510c306ff9cbcde34cc25 /ext
parentb80545a93f63986a47726deb8ad7460215ee2d22 (diff)
downloadmongo-1bdccb84fd4ea7ec3fc818d049b7b6ae317f74bc.tar.gz
WT-1822
Coverity CID #1320624, resource leak.
Diffstat (limited to 'ext')
-rw-r--r--ext/encryptors/rotn/rotn_encrypt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/encryptors/rotn/rotn_encrypt.c b/ext/encryptors/rotn/rotn_encrypt.c
index 7d68717e3ca..5b29e66c503 100644
--- a/ext/encryptors/rotn/rotn_encrypt.c
+++ b/ext/encryptors/rotn/rotn_encrypt.c
@@ -493,9 +493,10 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config)
rotn_encryptor->encryptor.terminate = rotn_terminate;
rotn_encryptor->wtext = connection->get_extension_api(connection);
- if ((ret = rotn_configure(rotn_encryptor, config)) != 0)
+ if ((ret = rotn_configure(rotn_encryptor, config)) != 0) {
+ free(rotn_encryptor);
return (ret);
-
+ }
/* Load the encryptor */
return (connection->add_encryptor(
connection, "rotn", (WT_ENCRYPTOR *)rotn_encryptor, NULL));