From b419ebc7e99c6c48730867b55a33147951036fd5 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 3 Sep 2008 07:12:37 +0000 Subject: [PATCH] * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc Daniel --- ChangeLog | 4 ++++ src/storage_conf.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index b47840623d..8ab308280e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Sep 3 09:08:01 CEST 2008 Daniel Veillard + + * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc + Tue Sep 2 17:30:50 CEST 2008 Daniel Veillard * src/domain_conf.c: fix a parsing error for input devices diff --git a/src/storage_conf.c b/src/storage_conf.c index 2f6093beb6..dcc1fc2611 100644 --- a/src/storage_conf.c +++ b/src/storage_conf.c @@ -331,6 +331,11 @@ virStoragePoolDefParseDoc(virConnectPtr conn, if (ret->source.name == NULL) { /* source name defaults to pool name */ ret->source.name = strdup(ret->name); + if (ret->source.name == NULL) { + virStorageReportError(conn, VIR_ERR_NO_MEMORY, "%s", + _("pool name")); + goto cleanup; + } } } -- GitLab