implemented why2_open

wow no memory leak

ngl didn't expect that
This commit is contained in:
Václav Šmejkal 2023-02-05 19:07:43 +01:00
parent 263c73b80f
commit a42e0a9ca9
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ why2_log_file why2_init_logger(char *directoryPath)
sprintf(filePath, WHY2_LOG_FORMATTING, directoryPath, dateBuffer, buffer); //GENERATE LOG-NAME
file = open(filePath, O_RDWR | O_APPEND | O_CREAT, 0644); //CREATE LOG FILE
file = why2_open(filePath, O_RDWR | O_APPEND | O_CREAT, 0644); //CREATE LOG FILE
//CREATE SYMLINK
sprintf(latestBuffer, WHY2_LOG_LATEST_FORMATTING, WHY2_WRITE_DIR, WHY2_LOG_LATEST); //GENERATE LATEST.log PATH

View File

@ -31,7 +31,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
void why2_deallocate_logger(why2_log_file logger)
{
close(logger.file);
why2_deallocate(&logger.file);
why2_deallocate(logger.filename);
logger.filename = NULL;