[Issue#] LINUXNGWAP-506
[Bug] FILE resource resFp may not be released when encFp is not
properly initialized (fopen error, returning from function).
[Cause] N/A
[Solution] Release resFp right after it is used.
[Verification] Install tizen spec manual test case: TC21, check if
widget file "index.html" is encrypted.
Change-Id: I8a8393df17b7d49b297bf42db2c3c44a758ce2be
memset(outEncBuf, 0, blockSize);
fread(readBuf, sizeof(unsigned char), fileSize, resFp);
+ fclose(resFp);
m_resEnc->EncryptChunk(readBuf, outEncBuf, fileSize);
return;
}
fwrite(outEncBuf, sizeof(unsigned char), blockSize, encFp);
-
- fclose(resFp);
fclose(encFp);
LogDebug("Success to encrypt file");