From: Alan T. DeKok Date: Wed, 19 Oct 2011 15:34:01 +0000 (+0200) Subject: Call closedir() on error X-Git-Tag: release_2_2_0~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00676f3c9e9e2402985d869cbf872330fba0b050;p=thirdparty%2Ffreeradius-server.git Call closedir() on error --- diff --git a/src/main/client.c b/src/main/client.c index b4069438f39..5bfd5297539 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -874,6 +874,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; } @@ -883,6 +884,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 */