Check for null ferr
fout is double checked for nullptr instead of ferr which forces to call fclose on null ferr. Test: atest incidentd_test Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer with clusterfuzz testcase Bug: 283453191 Change-Id: I3a4912cf70f4f32cb66fb870febbbfff1a7c6adc
This commit is contained in:
@@ -536,7 +536,7 @@ status_t IncidentService::onTransact(uint32_t code, const Parcel& data, Parcel*
|
||||
fflush(fout);
|
||||
fclose(fout);
|
||||
}
|
||||
if (fout != NULL) {
|
||||
if (ferr != NULL) {
|
||||
fflush(ferr);
|
||||
fclose(ferr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user