[fedfs-utils] [PATCH 08/17] libnsdb: Fix memory leak in nsdb_posix_to_path_array()
Chuck Lever
chuck.lever at oracle.com
Tue May 27 08:37:30 PDT 2014
Fixes: e2800750f4bbb033e1ab9b4937139879444b7576
Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
---
src/libnsdb/path.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/libnsdb/path.c b/src/libnsdb/path.c
index c14d51625339..ae9d5c64b6ad 100644
--- a/src/libnsdb/path.c
+++ b/src/libnsdb/path.c
@@ -382,8 +382,7 @@ nsdb_posix_to_path_array(const char *pathname, char ***path_array)
result = (char **)calloc(count + 1, sizeof(char *));
if (result == NULL) {
- xlog(L_ERROR, "%s: Failed to allocate array",
- __func__);
+ free(normalized);
return FEDFS_ERR_SVRFAULT;
}
More information about the fedfs-utils-devel
mailing list