Fossil SCM

Moved a db_finalize() which would not have been called in a couple of error cases.

stephan 2011-09-19 19:03 UTC json
Commit afc1cec6a308d040b5a81f0241e5806352b1c332
1 file changed +1 -1
+1 -1
--- src/json.c
+++ src/json.c
@@ -1292,17 +1292,17 @@
12921292
}else if( 0 != cson_array_append( list, v ) ){
12931293
cson_value_free(v);
12941294
goto error;
12951295
}
12961296
}
1297
- db_finalize(&q);
12981297
goto end;
12991298
error:
13001299
g.json.resultCode = FSL_JSON_E_UNKNOWN;
13011300
cson_value_free(listV);
13021301
listV = NULL;
13031302
end:
1303
+ db_finalize(&q);
13041304
return listV;
13051305
}
13061306
13071307
/*
13081308
** Mapping of names to JSON pages/commands. Each name is a subpath of
13091309
--- src/json.c
+++ src/json.c
@@ -1292,17 +1292,17 @@
1292 }else if( 0 != cson_array_append( list, v ) ){
1293 cson_value_free(v);
1294 goto error;
1295 }
1296 }
1297 db_finalize(&q);
1298 goto end;
1299 error:
1300 g.json.resultCode = FSL_JSON_E_UNKNOWN;
1301 cson_value_free(listV);
1302 listV = NULL;
1303 end:
 
1304 return listV;
1305 }
1306
1307 /*
1308 ** Mapping of names to JSON pages/commands. Each name is a subpath of
1309
--- src/json.c
+++ src/json.c
@@ -1292,17 +1292,17 @@
1292 }else if( 0 != cson_array_append( list, v ) ){
1293 cson_value_free(v);
1294 goto error;
1295 }
1296 }
 
1297 goto end;
1298 error:
1299 g.json.resultCode = FSL_JSON_E_UNKNOWN;
1300 cson_value_free(listV);
1301 listV = NULL;
1302 end:
1303 db_finalize(&q);
1304 return listV;
1305 }
1306
1307 /*
1308 ** Mapping of names to JSON pages/commands. Each name is a subpath of
1309

Keyboard Shortcuts

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