From: Alan T. DeKok Date: Wed, 19 Oct 2011 15:34:01 +0000 (+0200) Subject: Call closedir() on error X-Git-Tag: release_3_0_0_beta0~561 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e494a2d3db1c940d524e1f534512ccca1f241efb;p=thirdparty%2Ffreeradius-server.git Call closedir() on error --- diff --git a/src/main/client.c b/src/main/client.c index e986b1c2909..1be7da81b23 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -891,6 +891,7 @@ RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section) cf_log_err(cf_sectiontoitem(cs), "Failed reading client file \"%s\"", buf2); client_free(c); + closedir(dir); return NULL; } @@ -900,6 +901,7 @@ RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section) if (!client_validate(clients, c, dc)) { client_free(c); + closedir(dir); return NULL; } } /* loop over the directory */