Hi, <br><br><div><span class="gmail_quote">On 4/20/07, <b class="gmail_sendername">Nikos Antonopoulos</b> <<a href="mailto:nantonop@orbitech.gr">nantonop@orbitech.gr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>static void DupString( vlc_value_t *p_val ) { p_val->psz_string =<br>strdup( p_val->psz_string ); }<br><br><br>surely this is nothing but a small memleak... or is it???</blockquote><div><br><br> Well, without knowing its specific function, it doesn't have to memleak. 
<br><br>Consider the following bit of code:<br><br>char *f = "hello world";<br>p_val->psz_string = f;<br><br>DupString(p_val);<br><br>free(f);<br>f = NULL; <br></div><br></div>It can be quite useful at times if you don't want to :
<br>p_val->psz_string = strdup(f);<br><br><br>Kenneth