- Notifications
You must be signed in to change notification settings - Fork5
Commit77949a2
committed
Change the way string relopts are allocated.
Don't try to allocate the default value for a string relopt in the samepalloc chunk as the relopt_string struct. That didn't work too well if youadded a built-in string relopt in the stringRelOpts array, as it's notpossible to have an initializer for a variable length struct in C. Thismakes the code slightly simpler too.While we're at it, move the call to validator function inadd_string_reloption to before the allocation, so that if someone does passa bogus default value, we don't leak memory.1 parent5b6c843 commit77949a2
File tree
2 files changed
+13
-28
lines changed- src
- backend/access/common
- include/access
2 files changed
+13
-28
lines changedLines changed: 12 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
374 |
| - | |
375 |
| - | |
376 | 374 |
| |
377 | 375 |
| |
378 | 376 |
| |
| |||
386 | 384 |
| |
387 | 385 |
| |
388 | 386 |
| |
| 387 | + | |
| 388 | + | |
| 389 | + | |
389 | 390 |
| |
390 | 391 |
| |
391 | 392 |
| |
| |||
474 | 475 |
| |
475 | 476 |
| |
476 | 477 |
| |
477 |
| - | |
478 | 478 |
| |
479 |
| - | |
480 |
| - | |
481 |
| - | |
482 |
| - | |
483 |
| - | |
484 |
| - | |
485 | 479 |
| |
486 |
| - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
487 | 483 |
| |
488 |
| - | |
489 |
| - | |
490 |
| - | |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
| 484 | + | |
| 485 | + | |
496 | 486 |
| |
497 | 487 |
| |
498 | 488 |
| |
499 |
| - | |
500 |
| - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
501 | 492 |
| |
502 | 493 |
| |
503 | 494 |
| |
504 | 495 |
| |
505 |
| - | |
| 496 | + | |
506 | 497 |
| |
507 | 498 |
| |
508 | 499 |
| |
509 | 500 |
| |
510 |
| - | |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 | 501 |
| |
517 | 502 |
| |
518 | 503 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
111 |
| - | |
| 111 | + | |
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
|
0 commit comments
Comments
(0)