summaryrefslogtreecommitdiff
path: root/lib/srv6.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-10-29 19:56:07 -0400
committerGitHub <noreply@github.com>2022-10-29 19:56:07 -0400
commitb7128471c6c4022b90cfd56667f767cf50931e6c (patch)
treef78d59f1971cce2dbd3a8c42b96b06d7066fb8b2 /lib/srv6.c
parent5ac678c59994e7c0b435decd098cb051a6e5a4f9 (diff)
parentefae8c26cbb10762a6d87056f4e443e4043c5e36 (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.c4
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)