Fixes: e2800750f4bbb033e1ab9b4937139879444b7576
Signed-off-by: Chuck Lever <[email protected]>
---
 src/libnsdb/path.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libnsdb/path.c b/src/libnsdb/path.c
index 0b343fc..f08560f 100644
--- a/src/libnsdb/path.c
+++ b/src/libnsdb/path.c
@@ -363,8 +363,10 @@ nsdb_posix_to_path_array(const char *pathname, char 
***path_array)
        }
 
        result = (char **)calloc(count + 1, sizeof(char *));
-       if (result == NULL)
+       if (result == NULL) {
+               free(normalized);
                return FEDFS_ERR_SVRFAULT;
+       }
 
        component = normalized;
        for (i = 0; ; i++) {


_______________________________________________
fedfs-utils-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel

Reply via email to