public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: STABLE2 - cman: Fix qdiskd file descriptor leak Date: Tue, 02 Sep 2008 15:36:00 -0000 [thread overview] Message-ID: <20080902153439.503441203B7@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a012dc47f024f327029865073a41afd573a4b5d0 Commit: a012dc47f024f327029865073a41afd573a4b5d0 Parent: 75695e0c5cdd2511aef1b52a46dbf69ff95869dc Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Tue Sep 2 11:33:18 2008 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Tue Sep 2 11:34:31 2008 -0400 cman: Fix qdiskd file descriptor leak Patch from Sean E. Millichamp <sean at bruenor dot org> rhbz#460645 --- cman/qdisk/disk.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/cman/qdisk/disk.c b/cman/qdisk/disk.c index 6c591f3..6839c95 100644 --- a/cman/qdisk/disk.c +++ b/cman/qdisk/disk.c @@ -209,6 +209,7 @@ qdisk_open(char *name, target_info_t *disk) ret = ioctl(disk->d_fd, BLKSSZGET, &ssz); if (ret < 0) { perror("qdisk_open: ioctl(BLKSSZGET)"); + close(disk->d_fd); return -1; } @@ -219,12 +220,14 @@ qdisk_open(char *name, target_info_t *disk) ret = lseek(disk->d_fd, END_OF_DISK(disk->d_blksz), SEEK_SET); if (ret < 0) { perror("open_partition: seek"); + close(disk->d_fd); return -1; } if (ret < END_OF_DISK(disk->d_blksz)) { fprintf(stderr, "Partition %s too small\n", name); errno = EINVAL; + close(disk->d_fd); return -1; }
reply other threads:[~2008-09-02 15:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080902153439.503441203B7@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).