Merge pull request #1384 from rubenk/irq-close-file-descriptor-on-failure
authorRuben Kerkhof <ruben@tilaa.nl>
Sun, 29 Nov 2015 12:35:12 +0000 (13:35 +0100)
committerRuben Kerkhof <ruben@tilaa.nl>
Sun, 29 Nov 2015 12:35:12 +0000 (13:35 +0100)
irq plugin: close file descriptor on failure

src/irq.c

index 6afacf0..93f3f53 100644 (file)
--- a/src/irq.c
+++ b/src/irq.c
@@ -120,6 +120,7 @@ static int irq_read (void)
        } else {
                ERROR ("irq plugin: unable to get CPU count from first line "
                                "of /proc/interrupts");
+               fclose (fh);
                return (-1);
        }