<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Aug 3, 2010 at 12:11 PM, Rémi Duraffort <span dir="ltr"><<a href="mailto:ivoire@videolan.org">ivoire@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> > > +    if( p_scan->parameter.type == SCAN_DVB_S )<br>
> > > +        /* set satellite config file path */<br>
> > > +        strncpy( p_scan->parameter.sat_info.psz_name,<br>
> > > +                 var_GetString( p_access, "dvb-satellite" ),<br>
> > > +                 sizeof(p_scan->parameter.sat_info.psz_name) );<br>
> ><br>
> > Memory leak.<br>
> ><br>
><br>
> Where's it leaking? .psz_name is allocated on the heap.<br>
</div>var_GetString allocate the memory needed for the string (strdup) so you<br>
are leaking here.<br></blockquote><div><br>Ahh ok. didn't realise it did a strdup (just thought it passed a ptr to the string).<br>Will fix - thanks! :)<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
best regards<br>
<font color="#888888"><br>
--<br>
Rémi Duraffort | ivoire<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><font size="1"><a style="font-family: courier new,monospace;" href="http://blog.2of1.org" target="_blank">http://blog.2of1.org</a></font><br></div>
<br>
</div>