in case of buffer overflow, osd_xattr_list() should leave
properly: release the semaphore and the cursor.
Change-Id: I750183cb083cb87b3d8adae8fb0f41b61e6689e5
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/15828
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
rc = strlen(za->za_name);
if (lb->lb_buf != NULL) {
if (counted + rc + 1 > lb->lb_len)
- RETURN(-ERANGE);
+ GOTO(out_fini, rc = -ERANGE);
memcpy(lb->lb_buf + counted, za->za_name, rc + 1);
}