aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-11-13 18:04:49 +0000
committerdrh <>2024-11-13 18:04:49 +0000
commit26c080a04b03db08c160a34d1616ceb72cde3c5e (patch)
treeff79241a14750e8410f08d726f3d5882273339af /src
parent31c160ab8f7b0c8f4a1a19ea5d9c6abe5083b37c (diff)
downloadsqlite-26c080a04b03db08c160a34d1616ceb72cde3c5e.tar.gz
sqlite-26c080a04b03db08c160a34d1616ceb72cde3c5e.zip
Fix a memory leak in the ".dump" command of the CLI that can occur if an
error other than database corruption is seen while trying to query the database. FossilOrigin-Name: 2560cc7072c923f534a5de1e15d2b0dd4ac5faf0a8876d9e3bf9804345585444
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index 3fb608ff7..722d8d49d 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -4886,9 +4886,9 @@ static int run_schema_dump_query(
}else{
rc = SQLITE_CORRUPT;
}
- sqlite3_free(zErr);
free(zQ2);
}
+ sqlite3_free(zErr);
return rc;
}