diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-04-06 17:19:06 +0300 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-04-06 17:19:06 +0300 |
| commit | 52bf3a6b791a381cf08a3ac167fac7375459aab9 (patch) | |
| tree | 19ea49b3c813ba8e88e948d12b604046b90724f2 | |
| parent | 1d6f69d1f056777401bcdfcde0844c9b9af1cbac (diff) | |
| download | SimpleMotionV2-52bf3a6b791a381cf08a3ac167fac7375459aab9.tar.gz SimpleMotionV2-52bf3a6b791a381cf08a3ac167fac7375459aab9.zip | |
Add missing fclose calls
| -rw-r--r-- | devicedeployment.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/devicedeployment.c b/devicedeployment.c index bdb718d..54f07e0 100644 --- a/devicedeployment.c +++ b/devicedeployment.c @@ -226,6 +226,8 @@ LoadConfigurationStatus smLoadConfiguration(const smbus smhandle, const int smad i++; } while(readOk==smtrue); + fclose(f); + *skippedCount=ignoredCount; *errorCount=setErrors; @@ -355,7 +357,10 @@ smbool loadBinaryFile( const char *filename, smuint8 **data, int *numbytes ) //allocate buffer *data=malloc(length); if(*data==NULL) + { + fclose(f); return smfalse; + } //read *numbytes=fread(*data,1,length,f); @@ -363,9 +368,11 @@ smbool loadBinaryFile( const char *filename, smuint8 **data, int *numbytes ) { free(*data); *numbytes=0; + fclose(f); return smfalse; } + fclose(f); return smtrue;//successl } |
