Merge pull request #2074 from matrix/fclose_1

remove redundant fclose
pull/2077/head
Jens Steube 5 years ago committed by GitHub
commit f4acae6c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

Loading…
Cancel
Save