[components][pipe] Fix 'pipe' command close bug when open failed.
This commit is contained in:
parent
2ec54bab7a
commit
3a83e5524f
|
@ -541,7 +541,7 @@ int pipe(int fildes[2])
|
||||||
fildes[1] = open(dev_name, O_WRONLY, 0);
|
fildes[1] = open(dev_name, O_WRONLY, 0);
|
||||||
if (fildes[1] < 0)
|
if (fildes[1] < 0)
|
||||||
{
|
{
|
||||||
close(fildes[1]);
|
close(fildes[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue