mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-02 13:36:08 +02:00
Added a NULL check after strdup() in backup.c
This commit is contained in:
parent
4c670a0be7
commit
fa35f2e09c
@ -2267,6 +2267,8 @@ set_cfs_datafiles(parray *files, const char *root, char *relative, size_t i)
|
||||
char *relative_prev_file;
|
||||
|
||||
cfs_tblspc_path = strdup(relative);
|
||||
if(!cfs_tblspc_path)
|
||||
elog(ERROR, "Out of memory");
|
||||
len = strlen("/pg_compression");
|
||||
cfs_tblspc_path[strlen(cfs_tblspc_path) - len] = 0;
|
||||
elog(VERBOSE, "CFS DIRECTORY %s, pg_compression path: %s", cfs_tblspc_path, relative);
|
||||
|
Loading…
x
Reference in New Issue
Block a user