Skip to content

Commit

Permalink
RDMA/core: Fix an error handling path in 'res_get_common_doit()'
Browse files Browse the repository at this point in the history
According to surrounding error paths, it is likely that 'goto err_get;' is
expected here. Otherwise, a call to 'rdma_restrack_put(res);' would be
missing.

Fixes: c5dfe0e ("RDMA/nldev: Add resource tracker doit callback")
Link: https://lore.kernel.org/r/20190818091044.8845-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Christophe JAILLET authored and Jason Gunthorpe committed Oct 4, 2019
1 parent ee4e404 commit ab59ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/nldev.c
Original file line number Diff line number Diff line change
@@ -1230,7 +1230,7 @@ static int res_get_common_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg) {
ret = -ENOMEM;
goto err;
goto err_get;
}

nlh = nlmsg_put(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq,

0 comments on commit ab59ca3

Please sign in to comment.