From: Alan T. DeKok Date: Wed, 19 Oct 2011 15:37:16 +0000 (+0200) Subject: Free memory on error X-Git-Tag: release_3_0_0_beta0~559 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d248bb6a3ac2d3e4a07e2a9d0fa7d2bdcddcbf9a;p=thirdparty%2Ffreeradius-server.git Free memory on error --- diff --git a/src/main/realms.c b/src/main/realms.c index 1fccac4e66a..c820045945a 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -1945,9 +1945,15 @@ int realms_init(CONF_SECTION *config) if (cf_data_find(cs, "home_server_pool")) continue; type = pool_peek_type(config, cs); - if (type == HOME_TYPE_INVALID) return 0; + if (type == HOME_TYPE_INVALID) { + free(rc); + realms_free(); + return 0; + } if (!server_pool_add(rc, cs, type, TRUE)) { + free(rc); + realms_free(); return 0; } }