moved encrypter's 'fileBuffer' deallocation at the end of encryptText
This commit is contained in:
parent
635f946671
commit
d35ce48684
@ -43,7 +43,6 @@ outputFlags encryptText(char *text, char *keyNew)
|
||||
fileBuffer = fopen("/dev/urandom", "r");
|
||||
fread(&numberBuffer, 4, 1, fileBuffer);
|
||||
srand(numberBuffer);
|
||||
fclose(fileBuffer);
|
||||
if (numberBuffer < 0) numberBuffer *= -1; //MAKE numberBuffer POSITIVE
|
||||
|
||||
if (keyNew != NULL)
|
||||
@ -147,6 +146,7 @@ outputFlags encryptText(char *text, char *keyNew)
|
||||
//DEALLOCATION
|
||||
free(textKeyChain);
|
||||
free(textBuffer);
|
||||
fclose(fileBuffer);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user