diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-02-21 00:04:06 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-02-21 00:04:06 +0000 |
commit | 6848a1622c9291a8e8aac750440bad66a744f0ed (patch) | |
tree | f959651de9308bd6a3481fba0b71c79c5f6d403e /tools/libxen | |
parent | 015c384bf9049a0f863a0602c422eb37b83a421a (diff) | |
download | xen-6848a1622c9291a8e8aac750440bad66a744f0ed.tar.gz xen-6848a1622c9291a8e8aac750440bad66a744f0ed.tar.bz2 xen-6848a1622c9291a8e8aac750440bad66a744f0ed.zip |
Fix allocation of the error_description fields.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r-- | tools/libxen/src/xen_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxen/src/xen_common.c b/tools/libxen/src/xen_common.c index 8c5feeb33f..c6e2181850 100644 --- a/tools/libxen/src/xen_common.c +++ b/tools/libxen/src/xen_common.c @@ -989,10 +989,10 @@ static void parse_failure(xen_session *session, xmlNode *node) 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; |