Fix missing check for memory allocation failure

This commit is contained in:
Daniel P. Berrange 2008-05-29 18:45:07 +00:00
parent 4b23495509
commit 489da1c4b1
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Thu May 29 14:44:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c: Fix missing check for failure
Thu May 29 11:29:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* tests/nodeinfotest.c, tests/qemuxml2argvtest.c,

View File

@ -924,6 +924,10 @@ char *sound_string_to_xml(const char *sound) {
// and build with all available models
if (STREQ(model, "all")) {
int i;
if (virBufferError(&buf)) {
free(model);
goto error;
}
free(virBufferContentAndReset(&buf));
for (i=0; i < sizeof(sound_models)/sizeof(*sound_models); ++i)