]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: don't crash listing filters in unprivileged daemon
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Dec 2017 16:39:05 +0000 (16:39 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 6 Dec 2017 09:37:25 +0000 (09:37 +0000)
commit7993554f70fd8d512dfde484490bcd1601b60b33
treedc7acc44059afbd0c5bfd29e807413ed205575d0
parentab7a2fe230bb742cc4bc7f8d1475201b97fe49ab
nwfilter: don't crash listing filters in unprivileged daemon

The unprivileged libvirtd does not support nwfilter config, by leaves the
driver active. It is supposed to result in all APIs being an effective
no-op, but several APIs rely on driver->nwfilters being non-NULL, or they
will reference a NULL pointer. Rather than adding checks for NULL in many
places, just make sure  driver->nwfilters is always initialized.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/nwfilter/nwfilter_driver.c