Skip to content

Commit

Permalink
DAOS-12000 client: fix a coverity issue (daos-stack#10732)
Browse files Browse the repository at this point in the history
To avoid the memory leak for dir in duns_create_path in
src/client/dfs/duns.c.

Signed-off-by: Lei Huang <[email protected]>
  • Loading branch information
wiliamhuang authored and wangzhaorong-cestc committed Nov 20, 2022
1 parent 674112a commit a57093d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/client/dfs/duns.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ duns_create_path(daos_handle_t poh, const char *path, struct duns_attr_t *attrp)
rc = errno;

D_ERROR("Failed to create dir %s: %d (%s)\n", path, rc, strerror(rc));
D_FREE(dir);
return rc;
}

Expand Down

0 comments on commit a57093d

Please sign in to comment.