summaryrefslogtreecommitdiffstats
path: root/src/expr/objref.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/objref.c')
-rw-r--r--src/expr/objref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/expr/objref.c b/src/expr/objref.c
index 4cfa3cb..b4b3383 100644
--- a/src/expr/objref.c
+++ b/src/expr/objref.c
@@ -236,6 +236,9 @@ static int nftnl_expr_objref_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags,
const struct nftnl_expr *e)
{
+ if (len)
+ buf[0] = '\0';
+
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_objref_snprintf_default(buf, len, e);