Skip to content

Commit

Permalink
[#295] Support GCC -fanalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed May 16, 2024
1 parent feaa45d commit ba37958
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libpgmoneta/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ pgmoneta_get_files(char* base, int* number_of_files, char*** files)
char** array = NULL;
int nof = 0;
int n;
DIR* dir;
DIR* dir = NULL;
struct dirent* entry;

*number_of_files = 0;
Expand Down Expand Up @@ -1375,6 +1375,11 @@ pgmoneta_get_files(char* base, int* number_of_files, char*** files)

dir = opendir(base);

if (dir == NULL)
{
goto error;
}

array = (char**)malloc(sizeof(char*) * nof);

if (array == NULL)
Expand Down

0 comments on commit ba37958

Please sign in to comment.