summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-09-17 18:10:10 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-10-22 13:56:21 -0400
commite668febd6ca1efdb1ec3ce1be2c5236a65b6c103 (patch)
treefe46565dd70e1314670dc317976f2287bef63a96 /server
parent63b426bed01b2c5e0af782989615944277b29945 (diff)
downloadsssd-e668febd6ca1efdb1ec3ce1be2c5236a65b6c103.tar.gz
sssd-e668febd6ca1efdb1ec3ce1be2c5236a65b6c103.tar.bz2
sssd-e668febd6ca1efdb1ec3ce1be2c5236a65b6c103.zip
Fix potential memory leaks in the data provider
Diffstat (limited to 'server')
-rw-r--r--server/providers/data_provider_be.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/providers/data_provider_be.c b/server/providers/data_provider_be.c
index a5f1b645..65f33ce7 100644
--- a/server/providers/data_provider_be.c
+++ b/server/providers/data_provider_be.c
@@ -910,7 +910,8 @@ static int load_backend_module(struct be_ctx *ctx,
++lb;
if (lb >= BET_MAX) {
DEBUG(2, ("Backend context corrupted.\n"));
- return EINVAL;
+ ret = EINVAL;
+ goto done;
}
}
@@ -918,7 +919,8 @@ static int load_backend_module(struct be_ctx *ctx,
path = talloc_asprintf(tmp_ctx, "%s/libsss_%s.so",
DATA_PROVIDER_PLUGINS_PATH, mod_name);
if (!path) {
- return ENOMEM;
+ ret = ENOMEM;
+ goto done;
}
DEBUG(7, ("Loading backend [%s] with path [%s].\n", mod_name, path));