[PATCH openEuler-22.03-LTS-SP1] pstore/platform: Add check for kstrdup