Commit ddd89a8
Fix memory leak in saveSnapshotToConnectionSockets (valkey-io#2503)
We now pass in rdbSnapshotOptions options in this function, and
options.conns
is now malloc'ed in the caller side, so we need to zfree it when
returning early
due to an error. Previously, conns was malloc'ed after the error
handling, so we
don't have this.
Introduced in valkey-io#1949.
---------
Signed-off-by: Binbin <[email protected]>1 parent becd43d commit ddd89a8
2 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3591 | 3591 | | |
3592 | 3592 | | |
3593 | 3593 | | |
3594 | | - | |
3595 | | - | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
3596 | 3597 | | |
3597 | 3598 | | |
3598 | 3599 | | |
3599 | | - | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
3600 | 3604 | | |
3601 | 3605 | | |
3602 | 3606 | | |
3603 | 3607 | | |
3604 | | - | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
3605 | 3612 | | |
3606 | 3613 | | |
3607 | 3614 | | |
3608 | 3615 | | |
3609 | 3616 | | |
3610 | 3617 | | |
3611 | | - | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
3612 | 3622 | | |
3613 | 3623 | | |
3614 | 3624 | | |
| |||
3617 | 3627 | | |
3618 | 3628 | | |
3619 | 3629 | | |
| 3630 | + | |
3620 | 3631 | | |
3621 | 3632 | | |
3622 | 3633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments