]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Prevent uninited use of tmp_oil in pim_mroute_add 6029/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Mar 2020 11:42:36 +0000 (07:42 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 20 Mar 2020 22:17:40 +0000 (18:17 -0400)
There exists a path where tmp_oil is used uninited, prevent
this from happening.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_mroute.c

index 5ce78636118cf0e61ad59e2f5140c9464be835cc..2e08ae28be62178f3d174344248ed6ba6a9c6edd 100644 (file)
@@ -961,7 +961,7 @@ static inline void pim_mroute_copy(struct mfcctl *oil,
 static int pim_mroute_add(struct channel_oil *c_oil, const char *name)
 {
        struct pim_instance *pim = c_oil->pim;
-       struct mfcctl tmp_oil;
+       struct mfcctl tmp_oil = { {0} };
        int err;
 
        pim->mroute_add_last = pim_time_monotonic_sec();