Pedro Alves wrote: > On Wednesday 09 March 2011 18:58:30, Michael Snyder wrote: >> In this case, it is possible for fieldname to be allocated before an >> exception is thrown. >> >> OK? > > Notice how `fieldname' is uninitialized by expression_completer. > If an exception is thrown from within parse_field_expression > before writting to `fieldname', you'll be calling `free' > (it should be xfree, btw) on an uninitialized pointer. That's > bad. > > Please fix this within parse_field_expression itself. > 1) even if what I describe above can't happen as is > today (it may or not, dunno), your change makes the > code quite fragile. 2) any other parse_field_expression call > that isn't wrapped in a TRY_CATCH like this, is a > potential leak. > OK how is this? I'm a little uncertain about the way "name" is handled there at the end...