Print this page
NEX-14979 HBA_LoadLibrary needs to close config file when done.
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/smhba/common/SMHBAAPILIB.c
          +++ new/usr/src/lib/smhba/common/SMHBAAPILIB.c
↓ open down ↓ 1077 lines elided ↑ open up ↑
1078 1078                  (void) fprintf(stderr,
1079 1079                      "HBA_LoadLibrary: Encounterd and error loading: %s",
1080 1080                      librarypath);
1081 1081                  DEBUG(1, "Encounterd and error loading: %s", librarypath, 0, 0);
1082 1082                  DEBUG(1, "  HBA_STATUS: %d", status, 0, 0);
1083 1083                  continue;
1084 1084          }
1085 1085          /* successfully loaded library */
1086 1086          lib_infop->status = HBA_LIBRARY_LOADED;
1087 1087          }
     1088 +        fclose(hbaconf);
1088 1089  #endif /* WIN32 or UNIX */
1089 1090  #ifdef POSIX_THREADS
1090 1091          /*
1091 1092           * The _hbaapi_LL_mutex is already grabbed to proctect the caller of
1092 1093           * HBA_FreeLibrary() during loading.
1093 1094           * The mutexes are already initialized
1094 1095           * with PTHREAD_MUTEX_INITIALIZER.  Do we need to init again?
1095 1096           * Keeping the code from HBAAPI source...
1096 1097           */
1097 1098          ret = pthread_mutex_init(&_hbaapi_AL_mutex, NULL);
↓ open down ↓ 3891 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX