G6PD help in maintaining the integrity of RBC by?
G6PD helps in neutralizing the effect of oxidative stress on the RBC. 
Oxidative stress is induced by drugs like primaquine and hence in patients of G6PD there is accelerated hemolysis (intravascular during the hemolytic episode) resulting in hemoglobinuria and passage of shockingly black urine by the patient.
Controlling reduction stress on RBC
Controlling oxidative stress on RBC
Maintaining flexibility of cell membrane
Component of electron transport chain