public inbox for hail-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [chunkd patch 3/6] Fix error path in fs_obj_open
Date: Thu, 20 May 2010 22:54:19 -0600	[thread overview]
Message-ID: <20100520225419.13662c85@redhat.com> (raw)

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>

---
 server/be-fs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 01ca098bb0e3f4efbcf2fd685a7c8780bb0ac51c
Author: Master <zaitcev@lembas.zaitcev.lan>
Date:   Thu May 20 21:29:14 2010 -0600

    Correct an error path.

diff --git a/server/be-fs.c b/server/be-fs.c
index 016b56f..533722f 100644
--- a/server/be-fs.c
+++ b/server/be-fs.c
@@ -478,7 +478,7 @@ struct backend_obj *fs_obj_open(uint32_t table_id, const char *user,
 			applog(LOG_ERR, "invalid object header key for %s",
 				obj->in_fn);
 		*err_code = che_InternalError;
-		goto err_out_fd;
+		goto err_out_read;
 	}
 
 	strncpy(obj->bo.hashstr, hdr.checksum, sizeof(obj->bo.hashstr));
@@ -488,6 +488,8 @@ struct backend_obj *fs_obj_open(uint32_t table_id, const char *user,
 
 	return &obj->bo;
 
+err_out_read:
+	free(obj->bo.key);
 err_out_fd:
 	close(obj->in_fd);
 err_out_fn:

                 reply	other threads:[~2010-05-21  4:54 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=20100520225419.13662c85@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox