devfs: fix cclose() crash in devfs error handling

This commit is contained in:
cinap_lenrek 2014-03-21 18:12:06 +01:00
parent 4abb38f177
commit 4a6939c2ce

View file

@ -646,7 +646,7 @@ mconfig(char* a, long n)
Fail: Fail:
for(i = 1; i < cb->nf; i++) for(i = 1; i < cb->nf; i++)
if(idev != nil && idev[i-1] != nil) if(idev != nil && idev[i-1] != nil)
cclose(idev[i]); cclose(idev[i-1]);
if(mp != nil) if(mp != nil)
mdeldev(mp); mdeldev(mp);
free(idev); free(idev);