diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-02-10 15:04:06 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-02-10 15:04:06 +0100 |
| commit | 148781210fbcb1b26d5df678a400fa5dd8549e42 (patch) | |
| tree | 78d57b0b68c54d029e47fdc834aacb0bc3815715 /lib/zclient.c | |
| parent | 01024b5235fb574b7a712d1363bc14df7cd1ad7e (diff) | |
lib: fix remaining coverity issues
Reported-by: Coverity
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index cea4b098fc..859751deb8 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -35,6 +35,7 @@ #include "nexthop.h" DEFINE_MTYPE_STATIC(LIB, ZCLIENT, "Zclient") +DEFINE_MTYPE_STATIC(LIB, REDIST_INST, "Redistribution instance IDs") /* Zebra client events. */ enum event {ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT}; @@ -106,7 +107,7 @@ redist_add_instance (struct redist_proto *red, u_short instance) if (!red->instances) red->instances = list_new(); - in = calloc (1, sizeof(u_short)); + in = XMALLOC (MTYPE_REDIST_INST, sizeof(u_short)); *in = instance; listnode_add (red->instances, in); } @@ -121,7 +122,7 @@ redist_del_instance (struct redist_proto *red, u_short instance) return; listnode_delete(red->instances, id); - free (id); + XFREE (MTYPE_REDIST_INST, id); if (!red->instances->count) { red->enabled = 0; |
