mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
event: avoid memory leak on cleanup
Detected by Coverity. Introduced in commitaaf2b70
, and turned into a regression in the next few commits through4e6e6672
(unreleased). * src/conf/domain_event.c (virDomainEventStateFree): Free object, per documentation.
This commit is contained in:
parent
2834d57175
commit
278a050a52
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* domain_event.c: domain event queue processing helpers
|
* 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
|
* Copyright (C) 2008 VirtualIron
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -555,6 +555,7 @@ virDomainEventStateFree(virDomainEventStatePtr state)
|
|||||||
|
|
||||||
if (state->timer != -1)
|
if (state->timer != -1)
|
||||||
virEventRemoveTimeout(state->timer);
|
virEventRemoveTimeout(state->timer);
|
||||||
|
VIR_FREE(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user