Hi Michael,
Thanks for all your great feedback.
> Or you could keep the "lineno" and the error generated in memory.c as
> this gives enough details about the location where the problem
> happens. We are going to need the extra "alloc_failed".
>
> [...]
>
> Hmm. But both are related and the same problem, no? This is touching
> the same code paths..
>
> [...]
>
> Nope, we could keep this shortcut in ecpg_strdup() as long as there is
> an extra field to track if an error has happened.
OK, patch 0002 implements this idea with minimal changes to the existing logic.