diff --git a/transport-helper.c b/transport-helper.c
index 07131261fefeab2066636a7f83bce05796329a54..6f227e253bf638de37ce74347213657c23185afa 100644 (file)
--- a/transport-helper.c
+++ b/transport-helper.c
private = apply_refspecs(data->refspecs, data->refspec_nr, posn->name);
else
private = xstrdup(posn->name);
private = apply_refspecs(data->refspecs, data->refspec_nr, posn->name);
else
private = xstrdup(posn->name);
- read_ref(private, posn->old_sha1);
- free(private);
+ if (private) {
+ read_ref(private, posn->old_sha1);
+ free(private);
+ }
}
strbuf_release(&buf);
return 0;
}
strbuf_release(&buf);
return 0;