Browse Source

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
Jim Meyering 17 years ago
parent
commit
dba6cd0859
1 changed files with 1 additions and 0 deletions
  1. 1 0
      exec/totemconfig.c

+ 1 - 0
exec/totemconfig.c

@@ -614,6 +614,7 @@ static int read_keyfile (
 			 res * 8, key_location);
 			 res * 8, key_location);
 		goto parse_error;
 		goto parse_error;
 	}
 	}
+	close (fd);
 	return 0;
 	return 0;
 
 
 parse_error:
 parse_error: