
< 	char *sm_alternate = NULL, *error_strategy = NULL;
---
> 	char *sm_alternate = strdup(""), *error_strategy = strdup("");
> 	if (!sm_alternate || !error_strategy) {
> 		free(sm_alternate);
> 		free(error_strategy);
> 		return -ENOMEM;
> 	}
