[PATCH openEuler-1.0-LTS] memcg: fix unsuitable null check after alloc memory