seac import: report database error

Also free the error message. Annoying C interface - found by
Coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-14 09:12:31 +02:00 committed by Michael Keller
parent e305546046
commit ef9ae5f6d6

View file

@ -290,7 +290,8 @@ int parse_seac_buffer(sqlite3 *handle, const char *url, const char *, int, struc
retval = sqlite3_exec(handle, get_dives, &seac_dive, &state, &err); retval = sqlite3_exec(handle, get_dives, &seac_dive, &state, &err);
if (retval != SQLITE_OK) { if (retval != SQLITE_OK) {
report_info("Database query failed '%s'.", url); report_info("Database query failed '%s': %s.", url, err);
sqlite3_free(err);
return 1; return 1;
} }