Don't crash on fclose if we can't write to output file for some reason
@@ -551,9 +551,9 @@ if((apstaessidliste != NULL) && (essidoutname != NULL))
}
zeiger++;
}
- }
fclose(fhoutlist);
}
+ }
removeemptyfile(essidoutname);
if((apstaessidliste != NULL) && (pmkoutname != NULL))
@@ -582,9 +582,9 @@ if((apstaessidliste != NULL) && (pmkoutname != NULL))
}
zeiger++;
}
- }
fclose(fhoutlist);
}
+ }
removeemptyfile(pmkoutname);
if((apstaessidliste != NULL) && (trafficoutname != NULL))
@@ -618,9 +618,9 @@ if((apstaessidliste != NULL) && (trafficoutname != NULL))
zeigerold = zeiger;
zeiger++;
}
- }
fclose(fhoutlist);
}
+ }
removeemptyfile(trafficoutname);
return;
}
@@ -660,9 +660,9 @@ if((nonceliste != NULL) && (nonceoutname != NULL))
zeigerold = zeiger;
zeiger++;
}
- }
fclose(fhoutlist);
}
+ }
removeemptyfile(nonceoutname);
return;
}
@@ -704,9 +704,9 @@ if((eapolliste != NULL) && (eapoloutname != NULL))
zeigerold = zeiger;
zeiger++;
}
- }
fclose(fhoutlist);
}
+ }
removeemptyfile(eapoloutname);
return;
}
@@ -821,8 +821,8 @@ if((handshakeliste != NULL) && (johnbestoutname != NULL))
writtencount++;
zeiger++;
}
- printf("%llu handshake(s) written to %s\n", writtencount, johnbestoutname);
fclose(fhoutlist);
+ printf("%llu handshake(s) written to %s\n", writtencount, johnbestoutname);
}
}
removeemptyfile(johnbestoutname);
