[LU-10766] Incorrect freeing in llapi_dir_create Created: 05/Mar/18 Updated: 28/Jan/22 Resolved: 15/Apr/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.11.0 |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Oleg Drokin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
llapi_dir_create has this code: dirpath = strdup(name);
if (!dirpath) {
free(lmu);
return -ENOMEM;
}
namepath = strdup(name);
if (!namepath) {
free(namepath);
free(lmu);
return -ENOMEM;
}
Of course it makes no sense to free() namepath when it was already NULL. |
| Comments |
| Comment by Oleg Drokin [ 05/Mar/18 ] |
|
This was introduced by https://review.whamcloud.com/30566 |
| Comment by Oleg Drokin [ 05/Mar/18 ] |
|
proposed patch in https://review.whamcloud.com/31510 |
| Comment by Gerrit Updater [ 14/Apr/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31510/ |
| Comment by Peter Jones [ 15/Apr/18 ] |
|
Landed for 2.12 |