1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtfile/dtcopy/dosync: CID 89374

This commit is contained in:
Jon Trulson 2018-04-11 16:04:16 -06:00
parent 1fa5834c60
commit c73ad48482

View file

@ -299,7 +299,7 @@ GetDirEntry(char *fname, FileOp *op, int *rc)
static int static int
GetDir(char *dirname, PatternList *xl, PatternList *sl, DirEntry **listPP) GetDir(char *dirname, PatternList *xl, PatternList *sl, DirEntry **listPP)
{ {
DIR *dirP; /* open directory */ DIR *dirP = NULL; /* open directory */
struct dirent *entryP; /* directory entry */ struct dirent *entryP; /* directory entry */
DirEntry *deP, *firstP, **linkPP; DirEntry *deP, *firstP, **linkPP;
char fname[1024], *fnP; char fname[1024], *fnP;
@ -345,6 +345,7 @@ GetDir(char *dirname, PatternList *xl, PatternList *sl, DirEntry **listPP)
/* if error occurred, call error callback function */ /* if error occurred, call error callback function */
if (rc != 0 && syncErrorCallback && syncErrorCallback(op, fname, rc) < 0) { if (rc != 0 && syncErrorCallback && syncErrorCallback(op, fname, rc) < 0) {
closedir(dirP);
FreeDir(firstP); FreeDir(firstP);
return -1; return -1;
} }