From: David Scott Date: Thu, 9 Oct 2014 09:17:30 +0000 (+0100) Subject: xl: 'replace_string' now uses xstrdup X-Git-Tag: 4.5.0-rc1~12 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d87ab990c1aaa7d083a49081e8b33b8d10a88f7f;p=xen.git xl: 'replace_string' now uses xstrdup This catches the out-of-memory exception and exits the program. Signed-off-by: David Scott Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index be809c8fb4..70d70bdfb0 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -839,7 +839,7 @@ static void parse_vcpu_affinity(libxl_domain_build_info *b_info, static void replace_string(char **str, const char *val) { free(*str); - *str = strdup(val); + *str = xstrdup(val); } static void parse_config_data(const char *config_source,