]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Add object checking for virObject{Ref|Unref}
authorJohn Ferlan <jferlan@redhat.com>
Fri, 31 Mar 2017 15:35:05 +0000 (11:35 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 15 Aug 2017 01:41:59 +0000 (21:41 -0400)
commitd3e17259e1224b1588e0502a6aa7ed9ff156f02e
treebb80eba94a6120405c6e30fd5e4b694626ec1854
parentdfa0efbb770f88b5c134545c969f8d47f95e6de9
util: Add object checking for virObject{Ref|Unref}

Rather than assuming that what's passed to virObject{Ref|Unref}
would be a virObjectPtr as long as it's not NULL, let's do the
similar checks virObjectIsClass in order to prevent a possible
increment or decrement to some field at the obj->u.s.refs offset.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virobject.c