summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index d978326a16c..d143179edc7 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -789,6 +789,9 @@ inode_resolve(inode_table_t *table, char *path)
parent = inode_ref(table->root);
str = tmp = gf_strdup(path);
+ if (str == NULL) {
+ goto out;
+ }
while (1) {
bname = strtok_r(str, "/", &saveptr);