created function for deallocating outputFlags

This commit is contained in:
Václav Šmejkal 2022-05-08 19:54:46 +02:00
parent 0389ca0226
commit 7b5f1ba9b6
2 changed files with 9 additions and 4 deletions

View File

@ -5,6 +5,7 @@
void checkVersion(inputFlags flags); //THIS FUNCTION CHECKS IF LATEST VERSION OF WHY2 IS USED
void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION
void deallocateOutput(outputFlags flags); //DEALLOCATES flags
int countIntLength(int number); //RETURNS LENGTH OF number
#endif

View File

@ -88,8 +88,7 @@ void checkVersion(inputFlags flags)
}
}
void
generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
{
int numberBuffer;
@ -117,8 +116,13 @@ generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
}
}
int
countIntLength(int number)
void deallocateOutput(outputFlags flags)
{
free(flags.outputText);
free(flags.usedKey);
}
int countIntLength(int number)
{
int returning = 1;
int buffer = 10;