From 78d8eeadcf6642eb52b3b178d6da620b0bb34289 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Oct 2023 16:58:13 +0100 Subject: Use unique_ptr for execution results --- libpqpp/pq-prepared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpqpp/pq-prepared.cpp') diff --git a/libpqpp/pq-prepared.cpp b/libpqpp/pq-prepared.cpp index bf8bd08..8678c11 100644 --- a/libpqpp/pq-prepared.cpp +++ b/libpqpp/pq-prepared.cpp @@ -26,8 +26,8 @@ PQ::PreparedStatement::prepare() const } std::stringstream psql; prepareSql(psql, sql); - c->checkResultFree(PQprepare(c->conn, stmntName.c_str(), std::move(psql).str().c_str(), - static_cast(values.size()), nullptr), + c->checkResult(PQprepare(c->conn, stmntName.c_str(), std::move(psql).str().c_str(), static_cast(values.size()), + nullptr), PGRES_COMMAND_OK); return (pstmt = c->preparedStatements.insert({hash, stmntName}).first->second.c_str()); } -- cgit v1.2.3