[LU-4849] double closedir() on error from cb_mv_init() Created: 01/Apr/14 Updated: 16/Jan/15 Resolved: 12/May/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0 |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | Cliff White (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | lfs, patch | ||
| Severity: | 3 |
| Rank (Obsolete): | 13360 |
| Description |
|
In liblustreapi.c:cb_mv_inti() if the parent cannot be opened then we will have closed *dirp but not set it to NULL. This causes a double free when closedir() is called a second time on the way out of llapi_semantic_traverse(). if (dirp != NULL)
closedir(*dirp);
if (parent == NULL) {
dir = opendir_parent(path);
if (dir == NULL) {
ret = -errno;
fprintf(stderr, "can not open %s ret %d\n",
path, ret);
return ret;
}
}
Also the fprintf() call should be llapi_error(..., "cannot open '%s'"). |
| Comments |
| Comment by Swapnil Pimpale (Inactive) [ 07/Apr/14 ] |
| Comment by Cliff White (Inactive) [ 21/Apr/14 ] |
|
Thanks, the patch passed testing |
| Comment by Cliff White (Inactive) [ 12/May/14 ] |
|
Patch has been merged |
| Comment by Gerrit Updater [ 16/Jan/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13441 |
| Comment by Frank Zago (Inactive) [ 16/Jan/15 ] |
|
Sorry. Wrong LU number. |