diff options
author | drh <drh@noemail.net> | 2008-12-04 12:26:00 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-12-04 12:26:00 +0000 |
commit | 1822eee09c9905915c8e474d9b0a94911be8a62c (patch) | |
tree | 993b4a772099bf0a27cca1d2fffee911713211fc /src | |
parent | 47b1066f8c8d35c483ab5165ef8e023ef18ec69e (diff) | |
download | sqlite-1822eee09c9905915c8e474d9b0a94911be8a62c.tar.gz sqlite-1822eee09c9905915c8e474d9b0a94911be8a62c.zip |
Fix a memory leak in the shell that occurs when a ".import" command fails.
Ticket #3517 (CVS 5975)
FossilOrigin-Name: cb9c15431c53b13b70d006d8c47741ebc1caaca3
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c index fb7340bf1..0581807b5 100644 --- a/src/shell.c +++ b/src/shell.c @@ -12,7 +12,7 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** -** $Id: shell.c,v 1.188 2008/11/17 08:05:32 chw Exp $ +** $Id: shell.c,v 1.189 2008/12/04 12:26:01 drh Exp $ */ #include <stdlib.h> #include <string.h> @@ -1270,6 +1270,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ fprintf(stderr,"%s line %d: expected %d columns of data but found %d\n", zFile, lineno, nCol, i+1); zCommit = "ROLLBACK"; + free(zLine); break; } for(i=0; i<nCol; i++){ |