Skip to content

Commit 62348e8

Browse files
committed
dpif-netlink: Fix potential leak of a malformed meters netlink reply.
If netlink transaction returns malformed or otherwise not parsable reply, it should be freed, as callers will not do that on failure. Found while reading the code. Fixes: 80738e5 ("dpif-netlink: Add meter support.") Acked-by: Aaron Conole <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
1 parent d923b2a commit 62348e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/dpif-netlink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4083,6 +4083,7 @@ dpif_netlink_meter_transact(struct ofpbuf *request, struct ofpbuf **replyp,
40834083
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
40844084
VLOG_DBG_RL(&rl,
40854085
"Kernel module response to meter tranaction is invalid");
4086+
ofpbuf_delete(*replyp);
40864087
return EINVAL;
40874088
}
40884089
return 0;

0 commit comments

Comments
 (0)