forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1acab12
committed
Remove memory leaks in isolationtester.
specscanner.l leaked a kilobyte of memory per token of the spec file.Apparently somebody thought that the introductory code block would beexecuted once; but it's once per yylex() call.A couple of functions in isolationtester.c leaked small amounts ofmemory due to not bothering to free one-time allocations. Mightas well improve these so that valgrind gives this program a cleanbill of health. Also get rid of an ugly static variable.Coverity complained about one of the one-time leaks, which led meto try valgrind'ing isolationtester, which led to discovery of thelarger leak.1 parentdcb0e24 commit1acab12
2 files changed
+19
-9
lines changedLines changed: 13 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
58 |
| - | |
| 57 | + | |
| 58 | + | |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
370 | 369 |
| |
371 |
| - | |
| 370 | + | |
| 371 | + | |
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
| |||
393 | 393 |
| |
394 | 394 |
| |
395 | 395 |
| |
| 396 | + | |
396 | 397 |
| |
397 | 398 |
| |
398 | 399 |
| |
| |||
418 | 419 |
| |
419 | 420 |
| |
420 | 421 |
| |
421 |
| - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
422 | 427 |
| |
423 | 428 |
| |
424 | 429 |
| |
425 |
| - | |
| 430 | + | |
| 431 | + | |
426 | 432 |
| |
427 | 433 |
| |
428 | 434 |
| |
| |||
444 | 450 |
| |
445 | 451 |
| |
446 | 452 |
| |
447 |
| - | |
| 453 | + | |
448 | 454 |
| |
449 | 455 |
| |
450 | 456 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 |
| |
58 | 62 |
| |
59 | 63 |
| |
|
0 commit comments
Comments
(0)