mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
doc: aliasing-test: close fd on write error
If write fails, remember to close(fd) before returning. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
7122bbb0d1
commit
5ffd27fa8d
1 changed files with 1 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ static int read_rom(char *path)
|
|||
|
||||
rc = write(fd, "1", 2);
|
||||
if (rc <= 0) {
|
||||
close(fd);
|
||||
perror("write");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue