Fix error path in fs_obj_open
PATCH 3/6 Fix error path in fs_obj_open
Signed-off-by Pete Zaitcev <[email protected]>
--- server/be-fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
commit 01ca098bb0e3f4efbcf2fd685a7c8780bb0ac51c
Author: Master <[email protected]> Date: Thu May 20 21:29:14 2010 -0600
Correct an error path.
server/be-fs.c +3 -1
@@ -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: