forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit642c069
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 parentc302a61 commit642c069
2 files changed
+19
-9
lines changedLines changed: 13 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
| 55 | + | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| |||
360 | 360 |
| |
361 | 361 |
| |
362 | 362 |
| |
363 |
| - | |
364 | 363 |
| |
365 |
| - | |
| 364 | + | |
| 365 | + | |
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
| |||
387 | 387 |
| |
388 | 388 |
| |
389 | 389 |
| |
| 390 | + | |
390 | 391 |
| |
391 | 392 |
| |
392 | 393 |
| |
| |||
412 | 413 |
| |
413 | 414 |
| |
414 | 415 |
| |
415 |
| - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
416 | 421 |
| |
417 | 422 |
| |
418 | 423 |
| |
419 |
| - | |
| 424 | + | |
| 425 | + | |
420 | 426 |
| |
421 | 427 |
| |
422 | 428 |
| |
| |||
438 | 444 |
| |
439 | 445 |
| |
440 | 446 |
| |
441 |
| - | |
| 447 | + | |
442 | 448 |
| |
443 | 449 |
| |
444 | 450 |
| |
|
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)