From b954028ff48d63a4c200ca660d711aa03a0e935f Mon Sep 17 00:00:00 2001 From: Avi Date: Wed, 2 Nov 2022 22:17:55 +1000 Subject: [PATCH] Fix #311, Free (close) FileDescriptor resource to avoid leak --- fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c b/fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c index 1b93393c..35dd3725 100644 --- a/fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c +++ b/fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c @@ -120,6 +120,8 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress) */ *EEPROMAddress = (cpuaddr)DataBuffer; + close(FileDescriptor); + return 0; }