nftnl_flowtable_get_data() doesn't assign to passt data_len pointer destination in all cases, so initialize it to 0. Fixes: eb58f53372e74 ("src: add flowtable support") Signed-off-by: Phil Sutter <phil@xxxxxx> --- src/flowtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flowtable.c b/src/flowtable.c index 31b3c1bbfee68..1f7ba3052d4fc 100644 --- a/src/flowtable.c +++ b/src/flowtable.c @@ -245,7 +245,7 @@ EXPORT_SYMBOL(nftnl_flowtable_get_str); uint32_t nftnl_flowtable_get_u32(const struct nftnl_flowtable *c, uint16_t attr) { - uint32_t data_len; + uint32_t data_len = 0; const uint32_t *val = nftnl_flowtable_get_data(c, attr, &data_len); nftnl_assert(val, attr, data_len == sizeof(uint32_t)); @@ -256,7 +256,7 @@ EXPORT_SYMBOL(nftnl_flowtable_get_u32); int32_t nftnl_flowtable_get_s32(const struct nftnl_flowtable *c, uint16_t attr) { - uint32_t data_len; + uint32_t data_len = 0; const int32_t *val = nftnl_flowtable_get_data(c, attr, &data_len); nftnl_assert(val, attr, data_len == sizeof(int32_t)); -- 2.19.0