mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-18 05:58:19 +01:00
+ Files with zero size are now processed properly during archive compacting
+ Fixed few memory leaks
This commit is contained in:
@@ -479,11 +479,14 @@ int SFileAddFile_Init(
|
||||
// Call the callback, if needed
|
||||
if(ha->pfnAddFileCB != NULL)
|
||||
ha->pfnAddFileCB(ha->pvAddFileUserData, 0, hf->dwDataSize, false);
|
||||
hf->nAddFileError = ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
// Store the error code from Add File operation
|
||||
if(hf != NULL)
|
||||
hf->nAddFileError = nError;
|
||||
// Fre the file handle if failed
|
||||
if(nError != ERROR_SUCCESS && hf != NULL)
|
||||
FreeFileHandle(hf);
|
||||
|
||||
// Give the handle to the caller
|
||||
*phf = hf;
|
||||
return nError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user