write_conf: Fix potential NULL dereference

In case if strdup failed we should not call strlen(NULL).
Note we return VZ_CONFIG_SAVE_ERROR instead of plain 1 since
the caller (ex. vps_remove_cfg_param) not always return the
same error code.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
1 file changed