mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Add various missing close() calls
This commit is contained in:
@@ -301,6 +301,8 @@ get_controlfile(const char *DataDir)
|
||||
ControlFilePath);
|
||||
log_detail("%s", strerror(errno));
|
||||
|
||||
close(fd);
|
||||
|
||||
return control_file_info;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,6 +276,8 @@ is_pg_running(const char *path)
|
||||
log_warning(_("invalid data in PostgreSQL PID file \"%s\""), path);
|
||||
}
|
||||
|
||||
fclose(pidf);
|
||||
|
||||
return PG_DIR_NOT_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
@@ -2476,6 +2476,8 @@ do_node_rejoin(void)
|
||||
|
||||
termPQExpBuffer(&slotdir_ent_path);
|
||||
}
|
||||
|
||||
closedir(slotdir);
|
||||
}
|
||||
termPQExpBuffer(&slotdir_path);
|
||||
}
|
||||
|
||||
@@ -6440,6 +6440,8 @@ run_file_backup(t_node_info *node_record)
|
||||
|
||||
if (fputs(tablespace_map.data, tablespace_map_file) == EOF)
|
||||
{
|
||||
fclose(tablespace_map_file);
|
||||
|
||||
log_error(_("unable to write to tablespace_map file \"%s\""), tablespace_map_filename.data);
|
||||
|
||||
r = ERR_BAD_BASEBACKUP;
|
||||
|
||||
Reference in New Issue
Block a user