WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix allocation of the error_description f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix allocation of the error_description fields.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Feb 2007 19:30:22 -0800
Delivery-date: Tue, 20 Feb 2007 19:31:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172016246 0
# Node ID 2414007d92ba0686ca22bff58ef691c34a14050b
# Parent  df08fe145d24d587151a0551fa292ad6b8b481a5
Fix allocation of the error_description fields.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/src/xen_common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r df08fe145d24 -r 2414007d92ba tools/libxen/src/xen_common.c
--- a/tools/libxen/src/xen_common.c     Tue Feb 20 23:59:13 2007 +0000
+++ b/tools/libxen/src/xen_common.c     Wed Feb 21 00:04:06 2007 +0000
@@ -989,10 +989,10 @@ static void parse_failure(xen_session *s
         char **c = (char **)error_descriptions->contents;
         int n = error_descriptions->size;
 
-        char **strings = malloc(3 * sizeof(char *));
+        char **strings = malloc(n * sizeof(char *));
         for (int i = 0; i < n; i++)
         {
-            strings[i] = xen_strdup_(c[i]);
+            strings[i] = c[i];
         }
 
         session->error_description_count = n;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix allocation of the error_description fields., Xen patchbot-unstable <=