From: Eric Blake Date: Thu, 2 Jun 2011 22:54:09 +0000 (-0600) Subject: event: avoid memory leak on cleanup X-Git-Tag: v0.9.2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=278a050a52cd8f5c54825315c21060f0de0cc43c;p=thirdparty%2Flibvirt.git event: avoid memory leak on cleanup Detected by Coverity. Introduced in commit aaf2b70, and turned into a regression in the next few commits through 4e6e6672 (unreleased). * src/conf/domain_event.c (virDomainEventStateFree): Free object, per documentation. --- diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 34a9d9118b..fabc1a5336 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -1,7 +1,7 @@ /* * domain_event.c: domain event queue processing helpers * - * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2010-2011 Red Hat, Inc. * Copyright (C) 2008 VirtualIron * * This library is free software; you can redistribute it and/or @@ -555,6 +555,7 @@ virDomainEventStateFree(virDomainEventStatePtr state) if (state->timer != -1) virEventRemoveTimeout(state->timer); + VIR_FREE(state); } /**