diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-27 21:19:20 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-05 10:53:17 -0400 |
| commit | acdf5e25101bafe334e6b500c3dd0a2babb3c1ec (patch) | |
| tree | d8b9483a3aeebc7e90ddbe5f765e5e63aecb8e1b /lib/zclient.c | |
| parent | affe9e99831408960b8b6f8477506ed2874a05dd (diff) | |
*: Convert list_free usage to list_delete
list_free is occassionally being used to delete the
list and accidently not deleting all the nodes.
We keep running across this usage pattern. Let's
remove the temptation and only allow list_delete
to handle list deletion.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 0b06dbacba..43d46a1801 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -123,8 +123,7 @@ void redist_del_instance(struct redist_proto *red, u_short instance) XFREE(MTYPE_REDIST_INST, id); if (!red->instances->count) { red->enabled = 0; - list_free(red->instances); - red->instances = NULL; + list_delete_and_null(&red->instances); } } |
