libcamera: proxy: linux: Initialise pointer members at construction time

If the IPAProxyLinux constructor fails to locate the proxy worker, the
socket_ and proc_ member pointers will be left uninitialised, leading
the a crash in the destructor. Initialise them both to nullptr.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2019-09-15 14:14:54 +03:00
parent 4ec807192d
commit 448393f77e

View file

@ -44,6 +44,7 @@ int IPAProxyLinux::init()
}
IPAProxyLinux::IPAProxyLinux(IPAModule *ipam)
: proc_(nullptr), socket_(nullptr)
{
LOG(IPAProxy, Debug)
<< "initializing dummy proxy: loading IPA from "