gleu/pgstats

Code issue

Closed this issue · 1 comments

errx(1, "could not connect to database %s: %s", opts->dbname, PQerrorMessage(my_conn));

errx => exit the program so PQfinish can't be call. maybe :

{ fprintf(stderr, "could not connect to database %s: %s", opts->dbname, PQerrorMessage(my_conn)); PQfinish(my_conn); exit(EXIT_FAILURE); }

gleu commented

Thanks for your report.