Fix stupid memory-allocation error.

This commit is contained in:
Garrett Wollman 1994-09-22 02:17:26 +00:00
parent fed2752194
commit 5ba34297b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2970

View File

@ -87,13 +87,16 @@ getvfsbyname(const char *name)
break;
}
if(i < _vfslistlen) {
_vfsconf = _vfslist[i];
}
if(!_vfs_keeplist) {
free(_vfslist);
free(_vfslist);
_vfslist = 0;
}
if(i < _vfslistlen) {
_vfsconf = _vfslist[i];
return &_vfsconf;
} else {
return 0;
@ -114,13 +117,16 @@ getvfsbytype(int type)
break;
}
if(i < _vfslistlen) {
_vfsconf = _vfslist[i];
}
if(!_vfs_keeplist) {
free(_vfslist);
_vfslist = 0;
}
if(i < _vfslistlen) {
_vfsconf = _vfslist[i];
return &_vfsconf;
} else {
return 0;