mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 01:38:57 +00:00
Fix stupid memory-allocation error.
This commit is contained in:
parent
fed2752194
commit
5ba34297b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2970
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user