From 5ffd27fa8d7950a3c2136100860273e6ff2605e0 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Wed, 8 Aug 2012 00:07:03 +0200 Subject: doc: aliasing-test: close fd on write error If write fails, remember to close(fd) before returning. Signed-off-by: Jesper Juhl Signed-off-by: Jiri Kosina --- Documentation/ia64/aliasing-test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/ia64') 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) rc = write(fd, "1", 2); if (rc <= 0) { + close(fd); perror("write"); return -1; } -- cgit v1.2.2