All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hefty, Sean" <sean.hefty@intel.com>
To: Honggang LI <honli@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: resource leak in librdmacm
Date: Tue, 21 Jan 2020 15:57:53 +0000	[thread overview]
Message-ID: <BYAPR11MB3272F4913688AE9B3BFF815C9E0D0@BYAPR11MB3272.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200121122133.GA105701@dhcp-128-72.nay.redhat.com>

> 	ch = rdma_create_event_channel();
> 	if (ch == NULL)
> 		printf("rdma_create_event_channel failed\n");
> 
> 	ret = rdma_create_id(ch, &id, NULL, RDMA_PS_TCP);
> 	if (ret != 0)
> 		printf("rdma_create_id failed\n");
> 
> 	ret = rdma_bind_addr(id, (struct sockaddr *) &ipoib_addr);
> 
> 	if (ret != 0)
> 		printf("rdma_bind_addr failed\n");
> 
> 	rdma_destroy_event_channel(ch);

This call should fail, since there's still a valid id open on it.

> 	rdma_destroy_id(id);
> }

- Sean

  reply	other threads:[~2020-01-21 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 12:21 resource leak in librdmacm Honggang LI
2020-01-21 15:57 ` Hefty, Sean [this message]
2020-01-22  8:56   ` Honggang LI
2020-01-22 15:22     ` Honggang LI
2020-01-23 14:21       ` Honggang LI
2020-01-29  1:04         ` Jason Gunthorpe
2020-01-31  3:04           ` Honggang LI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR11MB3272F4913688AE9B3BFF815C9E0D0@BYAPR11MB3272.namprd11.prod.outlook.com \
    --to=sean.hefty@intel.com \
    --cc=honli@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.