fix memory leak at drive_register_drive_path() and drive_free()

This commit is contained in:
weizhenwei 2017-06-13 15:26:01 +08:00
parent 7e5b766f78
commit a2ecf403b2

View File

@ -757,6 +757,7 @@ static UINT drive_free(DEVICE* device)
ListDictionary_Free(drive->files);
MessageQueue_Free(drive->IrpQueue);
Stream_Free(drive->device.data, TRUE);
free(drive->path);
free(drive);
return error;
}
@ -867,6 +868,7 @@ UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints,
out_error:
MessageQueue_Free(drive->IrpQueue);
ListDictionary_Free(drive->files);
free(drive->path);
free(drive);
return error;
}