fix null deref in error path
fix null deref in error path

pscedu/slash2-stable,pscedu/slash2-stable,pscedu/slash2-stable,pscedu/slash2-stable,pscedu/slash2-stable,pscedu/slash2-stable,pscedu/slash2-stable