irq plugin: close file descriptor on failure
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 28 Nov 2015 22:17:59 +0000 (23:17 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 28 Nov 2015 22:17:59 +0000 (23:17 +0100)
CID 38018

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);
        }