Changeset 18680 for trunk/ippTools/src/stacktool.c
- Timestamp:
- Jul 23, 2008, 1:13:50 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/stacktool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/stacktool.c
r18676 r18680 243 243 } 244 244 245 psArray *list = psArrayAllocEmpty(16); // List of runs, to print 245 246 for (long i = 0; i < output->n; i++) { 246 247 psMetadata *row = output->data[i]; // Row from select … … 253 254 psFree(output); 254 255 psFree(insert); 256 psFree(list); 255 257 if (!psDBRollback(config->dbh)) { 256 258 psError(PS_ERR_UNKNOWN, false, "database error"); … … 264 266 psFree(output); 265 267 psFree(insert); 268 psFree(list); 266 269 if (!psDBRollback(config->dbh)) { 267 270 psError(PS_ERR_UNKNOWN, false, "database error"); … … 275 278 psFree(output); 276 279 psFree(insert); 280 psFree(list); 277 281 if (!psDBRollback(config->dbh)) { 278 282 psError(PS_ERR_UNKNOWN, false, "database error"); … … 291 295 psFree(run); 292 296 psFree(insert); 297 psFree(list); 293 298 if (!psDBRollback(config->dbh)) { 294 299 psError(PS_ERR_UNKNOWN, false, "database error"); … … 301 306 run->stack_id = stack_id; 302 307 303 if (!stackRunPrintObject(stdout, run, !simple)) { 304 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 305 psFree(run); 306 psFree(insert); 307 if (!psDBRollback(config->dbh)) { 308 psError(PS_ERR_UNKNOWN, false, "database error"); 309 } 310 return false; 311 } 308 psArrayAdd(list, list->n, row); 312 309 psFree(run); 313 310 … … 326 323 psFree(insert); 327 324 psFree(output); 325 psFree(list); 328 326 if (!psDBRollback(config->dbh)) { 329 327 psError(PS_ERR_UNKNOWN, false, "database error"); … … 333 331 psFree(thisInsert); 334 332 } 333 psFree(output); 335 334 336 335 if (!psDBCommit(config->dbh)) { 337 336 psError(PS_ERR_UNKNOWN, false, "database error"); 338 return false; 339 } 340 341 psFree(output); 337 psFree(list); 338 return false; 339 } 340 341 if (!stackRunPrintObjects(stdout, list, !simple)) { 342 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 343 return false; 344 } 345 342 346 343 347 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
