All of lore.kernel.org
 help / color / mirror / Atom feed
* [chunkd patch 3/6] Fix error path in fs_obj_open
@ 2010-05-21  4:54 Pete Zaitcev
  0 siblings, 0 replies; only message in thread
From: Pete Zaitcev @ 2010-05-21  4:54 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

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:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-21  4:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21  4:54 [chunkd patch 3/6] Fix error path in fs_obj_open Pete Zaitcev

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.