# HG changeset patch # User Olaf Wintermann # Date 1739723887 -3600 # Node ID 862ab606ee064d8f759892c97292fee88ad2e9ff # Parent 59e62e65182c98b48014c4fecefd3cc86a5900b2 fix query cleanup in dbuResultAsValue functions diff -r 59e62e65182c -r 862ab606ee06 dbutils/db.c --- a/dbutils/db.c Sun Feb 16 15:50:04 2025 +0100 +++ b/dbutils/db.c Sun Feb 16 17:38:07 2025 +0100 @@ -108,11 +108,14 @@ *result = r->optional_getInt(r, 0); } else { cxstring s = r->getText(r, 0); + r->free(r); return cx_strtoi64(s, result, 10); } + r->free(r); return 0; } } + r->free(r); return -1; } @@ -140,9 +143,11 @@ cxstring s = r->getText(r, 0); if(s.ptr) { *result = cx_strdup(s); + r->free(r); return 0; } } } + r->free(r); return -1; }