Fossil SCM

Add missing db_finalize() statements.

drh 2014-03-31 12:59 trunk
Commit 07e93f38543713965ca39bb7eb28ce5dab924532
+1
--- src/name.c
+++ src/name.c
@@ -408,10 +408,11 @@
408408
@ %S(zUuid)</a> -
409409
object_description(rid, 0, 0);
410410
@ </p></li>
411411
}
412412
@ </ol>
413
+ db_finalize(&q);
413414
style_footer();
414415
}
415416
416417
/*
417418
** Convert the name in CGI parameter zParamName into a rid and return that
418419
--- src/name.c
+++ src/name.c
@@ -408,10 +408,11 @@
408 @ %S(zUuid)</a> -
409 object_description(rid, 0, 0);
410 @ </p></li>
411 }
412 @ </ol>
 
413 style_footer();
414 }
415
416 /*
417 ** Convert the name in CGI parameter zParamName into a rid and return that
418
--- src/name.c
+++ src/name.c
@@ -408,10 +408,11 @@
408 @ %S(zUuid)</a> -
409 object_description(rid, 0, 0);
410 @ </p></li>
411 }
412 @ </ol>
413 db_finalize(&q);
414 style_footer();
415 }
416
417 /*
418 ** Convert the name in CGI parameter zParamName into a rid and return that
419
--- src/report.c
+++ src/report.c
@@ -302,10 +302,11 @@
302302
"FROM reportfmt WHERE rn=%d",rn);
303303
style_header("SQL For Report Format Number %d", rn);
304304
if( db_step(&q)!=SQLITE_ROW ){
305305
@ <p>Unknown report number: %d(rn)</p>
306306
style_footer();
307
+ db_finalize(&q);
307308
return;
308309
}
309310
zTitle = db_column_text(&q, 0);
310311
zSQL = db_column_text(&q, 1);
311312
zOwner = db_column_text(&q, 2);
@@ -323,10 +324,11 @@
323324
output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
324325
@ </td>
325326
@ </tr></table>
326327
report_format_hints();
327328
style_footer();
329
+ db_finalize(&q);
328330
}
329331
330332
/*
331333
** WEBPAGE: /rptnew
332334
** WEBPAGE: /rptedit
@@ -1026,10 +1028,11 @@
10261028
/* view_add_functions(tabs); */
10271029
db_prepare(&q,
10281030
"SELECT title, sqlcode, owner, cols FROM reportfmt WHERE rn=%d", rn);
10291031
if( db_step(&q)!=SQLITE_ROW ){
10301032
cgi_redirect("reportlist");
1033
+ db_finalize(&q);
10311034
return;
10321035
}
10331036
zTitle = db_column_malloc(&q, 0);
10341037
zSql = db_column_malloc(&q, 1);
10351038
zOwner = db_column_malloc(&q, 2);
10361039
--- src/report.c
+++ src/report.c
@@ -302,10 +302,11 @@
302 "FROM reportfmt WHERE rn=%d",rn);
303 style_header("SQL For Report Format Number %d", rn);
304 if( db_step(&q)!=SQLITE_ROW ){
305 @ <p>Unknown report number: %d(rn)</p>
306 style_footer();
 
307 return;
308 }
309 zTitle = db_column_text(&q, 0);
310 zSQL = db_column_text(&q, 1);
311 zOwner = db_column_text(&q, 2);
@@ -323,10 +324,11 @@
323 output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
324 @ </td>
325 @ </tr></table>
326 report_format_hints();
327 style_footer();
 
328 }
329
330 /*
331 ** WEBPAGE: /rptnew
332 ** WEBPAGE: /rptedit
@@ -1026,10 +1028,11 @@
1026 /* view_add_functions(tabs); */
1027 db_prepare(&q,
1028 "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE rn=%d", rn);
1029 if( db_step(&q)!=SQLITE_ROW ){
1030 cgi_redirect("reportlist");
 
1031 return;
1032 }
1033 zTitle = db_column_malloc(&q, 0);
1034 zSql = db_column_malloc(&q, 1);
1035 zOwner = db_column_malloc(&q, 2);
1036
--- src/report.c
+++ src/report.c
@@ -302,10 +302,11 @@
302 "FROM reportfmt WHERE rn=%d",rn);
303 style_header("SQL For Report Format Number %d", rn);
304 if( db_step(&q)!=SQLITE_ROW ){
305 @ <p>Unknown report number: %d(rn)</p>
306 style_footer();
307 db_finalize(&q);
308 return;
309 }
310 zTitle = db_column_text(&q, 0);
311 zSQL = db_column_text(&q, 1);
312 zOwner = db_column_text(&q, 2);
@@ -323,10 +324,11 @@
324 output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
325 @ </td>
326 @ </tr></table>
327 report_format_hints();
328 style_footer();
329 db_finalize(&q);
330 }
331
332 /*
333 ** WEBPAGE: /rptnew
334 ** WEBPAGE: /rptedit
@@ -1026,10 +1028,11 @@
1028 /* view_add_functions(tabs); */
1029 db_prepare(&q,
1030 "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE rn=%d", rn);
1031 if( db_step(&q)!=SQLITE_ROW ){
1032 cgi_redirect("reportlist");
1033 db_finalize(&q);
1034 return;
1035 }
1036 zTitle = db_column_malloc(&q, 0);
1037 zSql = db_column_malloc(&q, 1);
1038 zOwner = db_column_malloc(&q, 2);
1039
--- src/setup.c
+++ src/setup.c
@@ -277,10 +277,11 @@
277277
@ </p></li>
278278
@
279279
@ </ol>
280280
@ </td></tr></table>
281281
style_footer();
282
+ db_finalize(&s);
282283
}
283284
284285
/*
285286
** Return true if zPw is a valid password string. A valid
286287
** password string is:
287288
--- src/setup.c
+++ src/setup.c
@@ -277,10 +277,11 @@
277 @ </p></li>
278 @
279 @ </ol>
280 @ </td></tr></table>
281 style_footer();
 
282 }
283
284 /*
285 ** Return true if zPw is a valid password string. A valid
286 ** password string is:
287
--- src/setup.c
+++ src/setup.c
@@ -277,10 +277,11 @@
277 @ </p></li>
278 @
279 @ </ol>
280 @ </td></tr></table>
281 style_footer();
282 db_finalize(&s);
283 }
284
285 /*
286 ** Return true if zPw is a valid password string. A valid
287 ** password string is:
288

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button