From f3c8d37be03284d97f1fbd01022a815dfcbee40a Mon Sep 17 00:00:00 2001 From: "imen.bhiri" Date: Wed, 7 Sep 2016 10:04:16 +0100 Subject: [PATCH] Ticket refs #10017 : CPE unstable connection request server --- dm/dmtree/common/deviceinfo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dm/dmtree/common/deviceinfo.c b/dm/dmtree/common/deviceinfo.c index 034ea7a..d89239a 100644 --- a/dm/dmtree/common/deviceinfo.c +++ b/dm/dmtree/common/deviceinfo.c @@ -331,8 +331,8 @@ int get_vcf_date(char *refparam, struct dmctx *ctx, char **value) *value = dmstrdup(date); } } + closedir (dir); } - closedir (dir); return 0; } @@ -400,9 +400,12 @@ int check_file_dir(char *name) struct dirent *d_file; if ((dir = opendir ("/etc/config/")) != NULL) { while ((d_file = readdir (dir)) != NULL) { - if(strcmp(name, d_file->d_name) == 0) + if(strcmp(name, d_file->d_name) == 0) { + closedir(dir); return 1; + } } + closedir(dir); } return 0; } @@ -420,8 +423,8 @@ inline int entry_method_device_info_vcf(struct dmctx *ctx) continue; update_section_list("dmmap","vcf", "name", 1, d_file->d_name, NULL, NULL, "backup_restore", "1"); } + closedir (dir); } - closedir (dir); uci_foreach_sections("dmmap", "vcf", s) { dmuci_get_value_by_section_string(s, "name", &name); if(del_sec) {