When wpa_supplicant is compiled with CONFIG_TESTING_OPTIONS and receives
a FLUSH command from wpa_cli, p2p_ctrl_flush() may crash due to passing
a NULL pointer into p2p_set_invitation_op_freq().
Add a NULL pointer check, similar to the other NULL pointer check
already in p2p_ctrl_flush().
Fixes: 475f50d71001 ("P2P2: Allow op class and channel override for Invitation Response") Signed-off-by: Dan Callaghan <dan.callaghan@morsemicro.com>