[libcamera-devel] [PATCH] libcamera: proxy: linux: Initialise pointer members at construction time
Jacopo Mondi
jacopo at jmondi.org
Sun Sep 15 14:38:21 CEST 2019
Hi Laurent,
On Sun, Sep 15, 2019 at 02:18:20PM +0300, Laurent Pinchart wrote:
> 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 at ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
> ---
> src/libcamera/proxy/ipa_proxy_linux.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp
> index 2a3872fdd52a..553714886f62 100644
> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp
> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp
> @@ -38,6 +38,7 @@ private:
> };
>
> IPAProxyLinux::IPAProxyLinux(IPAModule *ipam)
> + : proc_(nullptr), socket_(nullptr)
> {
> LOG(IPAProxy, Debug)
> << "initializing dummy proxy: loading IPA from "
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190915/2afc1ff5/attachment.sig>
More information about the libcamera-devel
mailing list