]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: mdev: Use a local variable instead of a direct pointer access
authorErik Skultety <eskultet@redhat.com>
Fri, 28 Apr 2017 05:52:52 +0000 (07:52 +0200)
committerErik Skultety <eskultet@redhat.com>
Thu, 4 May 2017 06:30:13 +0000 (08:30 +0200)
commit5d4ecee94fdcf128be95a06a62844fe87cf9c613
tree5c44f551cd6c159259ffe600a2b03688d5de1cc8
parent04535336a926b628875085168ea6930c868c368a
util: mdev: Use a local variable instead of a direct pointer access

Use a local variable to hold data, rather than accessing the pointer
after calling virMediatedDeviceListAdd (therefore VIR_APPEND_ELEMENT).
Although not causing an issue at the moment, this change is a necessary
prerequisite for tweaking virMediatedDeviceListAdd in a separate patch,
which will take a reference for the source pointer (instead of pointer
value) and will clear it along the way.

(cherry picked from commit 2739a983f235f0d92d210800d61bd1a195f01850)
Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/util/virmdev.c