From e668febd6ca1efdb1ec3ce1be2c5236a65b6c103 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Thu, 17 Sep 2009 18:10:10 +0200 Subject: Fix potential memory leaks in the data provider --- server/providers/data_provider_be.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/providers/data_provider_be.c b/server/providers/data_provider_be.c index a5f1b645b..65f33ce7d 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)); -- cgit