On Mon, 2003-10-27 at 09:30, Biot Olivier wrote:
> Oops - I sent an incorrect patch. This one is OK.
> 
> However it's still unclear to me why an fvalue_free() call before the new
> fvalue_set() call yields a core dump.
> 
> Regards,
> 
> Olivier


+       fvalue_free(fi->value);
+       fvalue_set(fi->value, new_str, TRUE);


Were you getting a core dump on the fvalue_free() or the fvalue_set()?

Note the fvalue_free() frees the memory used by the fvalue_t structure,
so the fvalue_set() immediately after fvalue_free() is writing to
deallocated memory.

--gilbert



Reply via email to