[chunkd patch 3/6] Fix error path in fs_obj_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>

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

commit 01ca098bb0e3f4efbcf2fd685a7c8780bb0ac51c
Author: Master <zaitcev@xxxxxxxxxxxxxxxxxx>
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:
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux