diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2022-10-29 19:56:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-29 19:56:07 -0400 |
| commit | b7128471c6c4022b90cfd56667f767cf50931e6c (patch) | |
| tree | f78d59f1971cce2dbd3a8c42b96b06d7066fb8b2 /lib/srv6.c | |
| parent | 5ac678c59994e7c0b435decd098cb051a6e5a4f9 (diff) | |
| parent | efae8c26cbb10762a6d87056f4e443e4043c5e36 (diff) | |
Merge pull request #12224 from cscarpitta/fix/enhance-srv6-locator-chunk-free-api
bgpd: Enhance the `srv6_locator_chunk_free()` API by automatically setting the pointer to the freed memory to `NULL`
Diffstat (limited to 'lib/srv6.c')
| -rw-r--r-- | lib/srv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/srv6.c b/lib/srv6.c index 306d92ae30..a8ec6f2b71 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -157,9 +157,9 @@ void srv6_locator_free(struct srv6_locator *locator) } } -void srv6_locator_chunk_free(struct srv6_locator_chunk *chunk) +void srv6_locator_chunk_free(struct srv6_locator_chunk **chunk) { - XFREE(MTYPE_SRV6_LOCATOR_CHUNK, chunk); + XFREE(MTYPE_SRV6_LOCATOR_CHUNK, *chunk); } json_object *srv6_locator_chunk_json(const struct srv6_locator_chunk *chunk) |
