Bugzilla Bug 345941: fixed another bug that we might pass uninitialized
'req' to fclose(). Thanks to Wolfgang Rosenauer <mozilla@rosenauer.org> for reporting the bug and reviewing the patch. git-svn-id: svn://10.0.0.236/trunk@205078 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
274902ccea
commit
6f4cbeded7
@ -2916,8 +2916,8 @@ void sha_test(char *reqfn)
|
||||
unsigned char seed[HASH_LENGTH_MAX]; /* max size of seed 64 bytes */
|
||||
unsigned char MD[HASH_LENGTH_MAX]; /* message digest */
|
||||
|
||||
FILE *req; /* input stream from the REQUEST file */
|
||||
FILE *resp; /* output stream to the RESPONSE file */
|
||||
FILE *req = NULL; /* input stream from the REQUEST file */
|
||||
FILE *resp; /* output stream to the RESPONSE file */
|
||||
|
||||
buf = PORT_ZAlloc(bufSize);
|
||||
if (buf == NULL) {
|
||||
@ -3013,7 +3013,9 @@ void sha_test(char *reqfn)
|
||||
}
|
||||
}
|
||||
loser:
|
||||
fclose(req);
|
||||
if (req) {
|
||||
fclose(req);
|
||||
}
|
||||
if (buf) {
|
||||
PORT_ZFree(buf, bufSize);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user