From: David Scott Subject: [PATCH v7 for-4.5 5/7] xl: 'replace_string' now uses xstrdup Date: Thu, 9 Oct 2014 10:17:30 +0100 Message-ID: <1412846252-25629-6-git-send-email-dave.scott@citrix.com> References: <1412846252-25629-1-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xc9rQ-00053R-TI for xen-devel@lists.xenproject.org; Thu, 09 Oct 2014 09:18:13 +0000 In-Reply-To: <1412846252-25629-1-git-send-email-dave.scott@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com Cc: David Scott , wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org This catches the out-of-memory exception and exits the program. Signed-off-by: David Scott --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 1fc2171..e5d20e6 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -815,7 +815,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, -- 1.7.10.4