]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote: fix crash on OOM
authorEric Blake <eblake@redhat.com>
Tue, 20 Sep 2011 18:11:32 +0000 (12:11 -0600)
committerDaniel Veillard <veillard@redhat.com>
Wed, 21 Sep 2011 08:17:20 +0000 (16:17 +0800)
commit2b0803c64f8fdbbbf0f135ef9be610579fd8fe8f
tree41381d10510e97d91c3a7a80d4cd172fa1331e73
parent7d7a7e291b937864b19910ea827b1eaeed329ca4
remote: fix crash on OOM

Bug introduced in commit 675464b.  On an OOM, this would try to
dereference a char* and free the contents as a pointer, which is
doomed to failure.

Adding a syntax check will prevent mistakes like this in the future.

* cfg.mk (sc_prohibit_internal_functions): New syntax check.
(exclude_file_name_regexp--sc_prohibit_internal_functions): Add
exemptions.
* daemon/remote.c (remoteRelayDomainEventIOError)
(remoteRelayDomainEventIOErrorReason)
(remoteRelayDomainEventGraphics, remoteRelayDomainEventBlockJob):
Use correct free function.
cfg.mk
daemon/remote.c