]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: systemd: Don't strlen a possibly NULL string
authorWang King <king.wang@huawei.com>
Wed, 12 Apr 2017 08:22:57 +0000 (16:22 +0800)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 12 Apr 2017 08:55:42 +0000 (10:55 +0200)
commitc5ca209f5848c68334c06cb2955758bd486fd149
tree1fa0bceae180e8fcef9eb9ff5de7a3bb87a0185b
parent1b1b045915bec4cbc6ed087c96be4b1de8953002
util: systemd: Don't strlen a possibly NULL string

Coverity complains about virBufferCurrentContent might be return null
when calling strlen, so check virBufferError first before calling
strlen.
src/util/virsystemd.c