<html><head></head><body>If you checked that zero init is unnecessary, then this should be fine.<br><br><div class="gmail_quote">Le 20 août 2018 15:38:18 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">---<br> modules/access/live555.cpp | 6 +++---<br> 1 file changed, 3 insertions(+), 3 deletions(-)<br><br>diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp<br>index 0060c24904..8464eb8dc3 100644<br>--- a/modules/access/live555.cpp<br>+++ b/modules/access/live555.cpp<br>@@ -342,12 +342,12 @@ static int Open ( vlc_object_t *p_this )<br> <br> p_demux->pf_demux = Demux;<br> p_demux->pf_control= Control;<br>- p_demux->p_sys = p_sys = (demux_sys_t*)calloc( 1, sizeof( demux_sys_t ) );<br>+ p_demux->p_sys = p_sys = new (std::nothrow)demux_sys_t();<br> if( !p_sys ) return VLC_ENOMEM;<br> <br> if( vlc_timer_create(&p_sys->timer, TimeoutPrevention, p_demux) )<br> {<br>- free( p_sys );<br>+ delete p_sys;<br> return VLC_ENOMEM;<br> }<br> <br>@@ -506,7 +506,7 @@ static void Close( vlc_object_t *p_this )<br> vlc_UrlClean( &p_sys->url );<br> vlc_mutex_destroy(&p_sys->timeout_mutex);<br> <br>- free( p_sys );<br>+ delete p_sys;<br> }<br> <br> static inline Boolean toBool( bool b ) { return b?True:False; } // silly, no?</pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>