]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Call closedir() on error
authorAlan T. DeKok <aland@freeradius.org>
Wed, 19 Oct 2011 15:34:01 +0000 (17:34 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 19 Oct 2011 15:40:05 +0000 (17:40 +0200)
src/main/client.c

index e986b1c29093b94f3cf9c9ee18d8c1ef35c4cec9..1be7da81b2345386326fa1b7eb84c69acc954e43 100644 (file)
@@ -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 */