You might have been right though moving it outside and
putting if(results) PQclear(results)... Just need to test it...
>
> OK, sorry, just dug through a bit more. OK; in the case of
> PGRES_NONFATAL_ERROR, the results have already been freed. In that case,
> I guess that the lines should be
>
> case PGRES_FATAL_ERROR:
> case PGRES_BAD_RESPONSE:
> PQclear(results);
> case PGRES_NONFATAL_ERROR:
> *success_p = false;
> fprintf(stderr, "%s", PQerrorMessage(settings->db));
> break;
>
> leaving the PQclears inside the switch.
>
> My apologies for denseness.
>
> -Tymm
>
>
------------------------------