diff --git a/docs/ACKNOWLEDGEMENTS.md b/docs/ACKNOWLEDGEMENTS.md index 0646b02..1db50ee 100644 --- a/docs/ACKNOWLEDGEMENTS.md +++ b/docs/ACKNOWLEDGEMENTS.md @@ -94,6 +94,7 @@ is acknowledged and greatly appreciated: * [xmort](https://codeberg.org/xmort) - added "`--output`" option ([#90](https://codeberg.org/a-j-wood/pv/pulls/90)) * [bogiord](https://codeberg.org/bogiord) - reported the loss of output block device size detection in 1.8.10, and suggested the fix ([#91](https://codeberg.org/a-j-wood/pv/issues/91)) * [eborisch](https://codeberg.org/eborisch) - provided fix for misbehaviour when used with "`zfs send`" due to treating zero sized writes (generally due to timer interruption) as end of file ([#92](https://codeberg.org/a-j-wood/pv/pulls/92), [#93](https://codeberg.org/a-j-wood/pv/pulls/93)) - * [alexanderperlis](https://codeberg.org/alexanderperlis) - provided initial support for block devices with "`--size @FILE`" ([#94](https://codeberg.org/a-j-wood/pv/pulls/94)) + * [alexanderperlis](https://codeberg.org/alexanderperlis) - provided initial support for block devices with "`--size @FILE`" ([#94](https://codeberg.org/a-j-wood/pv/pulls/94)) + * [jettero](https://codeberg.org/jettero) - reported double-free coredump when using "`--watchfd`" after 1.8.10 ([#96](https://codeberg.org/a-j-wood/pv/issues/96)) --- diff --git a/docs/NEWS.md b/docs/NEWS.md index 6823159..7f2ec94 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -1,3 +1,7 @@ +### UNRELEASED + + * fix: correct double-free on exit when using "`--watchfd`" ([#96](https://codeberg.org/a-j-wood/pv/issues/96)) reported by [jettero](https://codeberg.org/jettero) + ### 1.8.13 - 18 August 2024 * feature: when using "`--size @FILE`", _FILE_ can be a block device, and its size will be used (pull request [#94](https://codeberg.org/a-j-wood/pv/pulls/94)) supplied by [alexanderperlis](https://codeberg.org/alexanderperlis) diff --git a/src/pv/watchpid.c b/src/pv/watchpid.c index acd4841..5ba2779 100644 --- a/src/pv/watchpid.c +++ b/src/pv/watchpid.c @@ -478,6 +478,7 @@ int pv_watchpid_scanfds(pvstate_t state, /*@-mustfreeonly@ *//* splint - this is not a leak, this is a new entry. */ info_array[use_idx].state->control.name = NULL; info_array[use_idx].state->control.format_string = NULL; + info_array[use_idx].state->control.output_name = NULL; /*@+mustfreeonly@ */ info_array[use_idx].state->control.default_format[0] = '\0'; use_format_string =