summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/ibalance.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/ibalance.c')
-rw-r--r--fs/reiserfs/ibalance.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c
index b751eea32e20..5db6f45b3fed 100644
--- a/fs/reiserfs/ibalance.c
+++ b/fs/reiserfs/ibalance.c
@@ -1153,8 +1153,9 @@ int balance_internal(struct tree_balance *tb,
insert_ptr);
}
- memcpy(new_insert_key_addr, &new_insert_key, KEY_SIZE);
insert_ptr[0] = new_insert_ptr;
+ if (new_insert_ptr)
+ memcpy(new_insert_key_addr, &new_insert_key, KEY_SIZE);
return order;
}