1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-22 12:32:04 +00:00

Merge pull request #2074 from matrix/fclose_1

remove redundant fclose
This commit is contained in:
Jens Steube 2019-06-21 21:38:05 +02:00 committed by GitHub
commit f4acae6c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,13 +111,13 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
const int rc2 = count_words (hashcat_ctx, fp2, dictfile2, &words2_cnt);
fclose (fp1);
fclose (fp2);
if (rc2 == -1)
{
event_log_error (hashcat_ctx, "Integer overflow detected in keyspace of wordlist: %s", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
@ -125,15 +125,9 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
event_log_error (hashcat_ctx, "%s: empty file.", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
fclose (fp1);
fclose (fp2);
combinator_ctx->dict1 = dictfile1;
combinator_ctx->dict2 = dictfile2;
@ -220,13 +214,13 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
const int rc2 = count_words (hashcat_ctx, fp2, dictfile2, &words2_cnt);
fclose (fp1);
fclose (fp2);
if (rc2 == -1)
{
event_log_error (hashcat_ctx, "Integer overflow detected in keyspace of wordlist: %s", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
@ -234,15 +228,9 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
event_log_error (hashcat_ctx, "%s: empty file.", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
fclose (fp1);
fclose (fp2);
combinator_ctx->dict1 = dictfile1;
combinator_ctx->dict2 = dictfile2;
@ -357,13 +345,13 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
const int rc2 = count_words (hashcat_ctx, fp2, dictfile2, &words2_cnt);
fclose (fp1);
fclose (fp2);
if (rc2 == -1)
{
event_log_error (hashcat_ctx, "Integer overflow detected in keyspace of wordlist: %s", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
@ -371,15 +359,9 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
event_log_error (hashcat_ctx, "%s: empty file.", dictfile2);
fclose (fp1);
fclose (fp2);
return -1;
}
fclose (fp1);
fclose (fp2);
combinator_ctx->dict1 = dictfile1;
combinator_ctx->dict2 = dictfile2;