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:
@@ -44,6 +44,7 @@ int IPAProxyLinux::init()
|
||||
}
|
||||
|
||||
IPAProxyLinux::IPAProxyLinux(IPAModule *ipam)
|
||||
: proc_(nullptr), socket_(nullptr)
|
||||
{
|
||||
LOG(IPAProxy, Debug)
|
||||
<< "initializing dummy proxy: loading IPA from "
|
||||
|
||||
Reference in New Issue
Block a user