From dba6cd0859e5960a899e0249a85ffe48f1e92136 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 30 Mar 2009 14:33:42 +0000 Subject: [PATCH] totemconfig: avoid a file descriptor leak in the common case * exec/totemconfig.c (read_keyfile): Don't leak a file descriptor. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1914 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/totemconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec/totemconfig.c b/exec/totemconfig.c index 5bd59495..651d5535 100644 --- a/exec/totemconfig.c +++ b/exec/totemconfig.c @@ -614,6 +614,7 @@ static int read_keyfile ( res * 8, key_location); goto parse_error; } + close (fd); return 0; parse_error: