forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit31d8d47
committed
Guard against reallocation failure in pg_regress
realloc() will return NULL on a failed reallocation, so the destinationpointer must be inspected to avoid null pointer dereference. Further,assigning the return value to the source pointer leak the allocation inthe case of reallocation failure. Fix by using pg_realloc instead whichhas full error handling.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/9FC7E603-9246-4C62-B466-A39CFAF454AE@yesql.se1 parent6c46e8a commit31d8d47
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
774 | 774 |
| |
775 | 775 |
| |
776 | 776 |
| |
777 |
| - | |
| 777 | + | |
778 | 778 |
| |
779 | 779 |
| |
780 | 780 |
| |
|
0 commit comments
Comments
(0)