summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-09-15 14:14:54 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-09-15 17:26:45 +0300
commit448393f77ec9e37cb807e8e8d35c1a4877d253d4 (patch)
tree13c324c3a95b6743ab47fa7630b9ba1ec9150c5c /src
parent4ec807192d9f1ef682e2c257cf4d832c35042305 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/proxy/ipa_proxy_linux.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp
index 83a74250..62fcb529 100644
--- a/src/libcamera/proxy/ipa_proxy_linux.cpp
+++ b/src/libcamera/proxy/ipa_proxy_linux.cpp
@@ -44,6 +44,7 @@ int IPAProxyLinux::init()
}
IPAProxyLinux::IPAProxyLinux(IPAModule *ipam)
+ : proc_(nullptr), socket_(nullptr)
{
LOG(IPAProxy, Debug)
<< "initializing dummy proxy: loading IPA from "