<html><head></head><body style="zoom: 0%;"><div dir="auto">It happens when Close is called from the Open function in an error path</div>
<div class="gmail_quote" >On Apr 6, 2020, at 08:56, Steve Lhomme <<a href="mailto:robux4@ycbcr.xyz" target="_blank">robux4@ycbcr.xyz</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">On 2020-04-03 17:44, quentin.chateau@deepskycorp.com wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> From: Quentin Chateau <quentin.chateau@deepskycorp.com><br> <br> ---<br> modules/hw/nvdec/nvdec_gl.c | 3 ++-<br> 1 file changed, 2 insertions(+), 1 deletion(-)<br> <br> diff --git a/modules/hw/nvdec/nvdec_gl.c b/modules/hw/nvdec/nvdec_gl.c<br> index 137e730028..18a34d061c 100644<br> --- a/modules/hw/nvdec/nvdec_gl.c<br> +++ b/modules/hw/nvdec/nvdec_gl.c<br> @@ -150,7 +150,8 @@ static void Close(vlc_object_t *obj)<br> {<br> struct vlc_gl_interop *interop = (void *)obj;<br> converter_sys_t *p_sys = interop->priv;<br> - vlc_decoder_device_Release(p_sys->device);<br> + if (p_sys)<br> + vlc_decoder_device_Release(p_sys->device);<br></blockquote><br>This is very suspicious. p_sys is owned by this object and not used by <br>anyone else. It's allocated with vlc_obj_malloc() so doesn't need to be <br>freed manually and is valid as long the object is valid.<br><br>If the pointer is wonrg it's a sign something is not working right <br>elsewhere.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> }<br> <br> static int Open(vlc_object_t *obj)<br> -- <br> 2.17.1<br> <br><hr><br> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br> <br></blockquote><hr><br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div></body></html>