mirror of https://github.com/BOINC/boinc.git
misztikus closedir() hiba misztikus javitasa...
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@961 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
3c19b50db9
commit
1147ac8ad1
|
@ -186,7 +186,7 @@ _DC_nuof_messages(char *box, char *name)
|
|||
return(0);
|
||||
if ((d= opendir(box)) == NULL)
|
||||
return(0);
|
||||
s= malloc(100+name?strlen(name):strlen(_DCAPI_MSG_MESSAGE));
|
||||
s= malloc(100 + (name?strlen(name):strlen(_DCAPI_MSG_MESSAGE)));
|
||||
strcpy(s, name?name:_DCAPI_MSG_MESSAGE);
|
||||
strcat(s, ".");
|
||||
while ((de= readdir(d)) != NULL)
|
||||
|
@ -195,8 +195,9 @@ _DC_nuof_messages(char *box, char *name)
|
|||
if (found == de->d_name)
|
||||
nuof++;
|
||||
}
|
||||
if (d)
|
||||
closedir(d);
|
||||
free(s);
|
||||
closedir(d);
|
||||
return(nuof);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue