File 0001-Missing-fclose-fix.patch of Package sblim-cmpi-nfsv3

From 9b3398ce574664777cc8d2bd85270be627753b4a Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Wed, 3 Aug 2011 12:57:51 +0200
Subject: [PATCH 1/3] Missing fclose fix

fclose was not called when valid_file() returned -1 (the file was
correctly opened).
---
 util/Linux_NFSv3SystemConfigurationUtil.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/Linux_NFSv3SystemConfigurationUtil.c b/util/Linux_NFSv3SystemConfigurationUtil.c
index 546c7e0..c40b53b 100644
--- a/util/Linux_NFSv3SystemConfigurationUtil.c
+++ b/util/Linux_NFSv3SystemConfigurationUtil.c
@@ -448,6 +448,8 @@ void * Linux_NFSv3_startReadingInstances()
     /* If etab file doesn't exist or is zero bytes, use exports */
     if ( ((sourcefile = fopen(_CONFIGFILE_ETAB, "r")) == NULL) || 
 	 (valid_file(_CONFIGFILE_ETAB) == -1)  ) {
+           if (sourcefile)
+              fclose(sourcefile);
            _OSBASE_TRACE(4,("startReadingInstances() : %s not found or contains no entries.  Using /etc/exports", _CONFIGFILE_ETAB));
            if ((sourcefile = fopen(_CONFIGFILE,"r")) == NULL) {
               _OSBASE_TRACE(1,("startReadingInstances() : Cannot read from config file %s", _CONFIGFILE));
-- 
2.48.1

openSUSE Build Service is sponsored by