diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-03-23 14:08:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-23 14:08:29 +0200 |
| commit | 6927446645221898256a6ec37653bb31a301db72 (patch) | |
| tree | 3039c1a7b7ee98a0da74fe99f7f9ef571825a3fa /lib/frrscript.c | |
| parent | 9cc377d4d7ccae8a318d0162c5d0d6a6754d8b0a (diff) | |
| parent | d8bc11a592110abdd14d11dfcb2ce623653ecab5 (diff) | |
Merge pull request #13074 from donaldsharp/hash_clean_and_free
*: Add a hash_clean_and_free() function
Diffstat (limited to 'lib/frrscript.c')
| -rw-r--r-- | lib/frrscript.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c index 4248a45002..1b99c7e2c6 100644 --- a/lib/frrscript.c +++ b/lib/frrscript.c @@ -398,8 +398,7 @@ fail: void frrscript_delete(struct frrscript *fs) { - hash_clean(fs->lua_function_hash, lua_function_free); - hash_free(fs->lua_function_hash); + hash_clean_and_free(&fs->lua_function_hash, lua_function_free); XFREE(MTYPE_SCRIPT, fs->name); XFREE(MTYPE_SCRIPT, fs); } @@ -417,8 +416,7 @@ void frrscript_init(const char *sd) void frrscript_fini(void) { - hash_clean(codec_hash, codec_free); - hash_free(codec_hash); + hash_clean_and_free(&codec_hash, codec_free); frrscript_names_destroy(); } |
