summaryrefslogtreecommitdiff
path: root/backref.c
diff options
context:
space:
mode:
Diffstat (limited to 'backref.c')
-rw-r--r--backref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backref.c b/backref.c
index 8615f6b8..27309e07 100644
--- a/backref.c
+++ b/backref.c
@@ -206,6 +206,9 @@ static int __add_prelim_ref(struct pref_state *prefstate, u64 root_id,
if (key) {
ref->key_for_search = *key;
head = &prefstate->pending;
+ } else if (parent) {
+ memset(&ref->key_for_search, 0, sizeof(ref->key_for_search));
+ head = &prefstate->pending;
} else {
memset(&ref->key_for_search, 0, sizeof(ref->key_for_search));
head = &prefstate->pending_missing_keys;