From: Daniel P. Berrange Date: Thu, 29 May 2008 18:45:07 +0000 (+0000) Subject: Fix missing check for memory allocation failure X-Git-Tag: LIBVIRT_0_4_4~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489da1c4b1ccb9fa73f790c86837ef1a0d283818;p=thirdparty%2Flibvirt.git Fix missing check for memory allocation failure --- diff --git a/ChangeLog b/ChangeLog index 8a9359b171..14cd4bc93e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu May 29 14:44:00 EST 2008 Daniel P. Berrange + + * src/xend_internal.c: Fix missing check for failure + Thu May 29 11:29:00 EST 2008 Daniel P. Berrange * tests/nodeinfotest.c, tests/qemuxml2argvtest.c, diff --git a/src/xend_internal.c b/src/xend_internal.c index df204251d3..d90a19bbbf 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -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)