aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ia64
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-08-07 18:07:03 -0400
committerJiri Kosina <jkosina@suse.cz>2012-09-01 12:57:10 -0400
commit5ffd27fa8d7950a3c2136100860273e6ff2605e0 (patch)
treecb45fc1d98d907dbadbded6553cf483b55af18e3 /Documentation/ia64
parent7122bbb0d14b7a6031aeef046b45d4934cb94ba7 (diff)
doc: aliasing-test: close fd on write error
If write fails, remember to close(fd) before returning. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/ia64')
-rw-r--r--Documentation/ia64/aliasing-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 5caa2af33207..62a190d45f38 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -132,6 +132,7 @@ static int read_rom(char *path)
132 132
133 rc = write(fd, "1", 2); 133 rc = write(fd, "1", 2);
134 if (rc <= 0) { 134 if (rc <= 0) {
135 close(fd);
135 perror("write"); 136 perror("write");
136 return -1; 137 return -1;
137 } 138 }