Fix a crash in ls-remote when refspec expands into nothing
Originally-by: Väinö Järvelä <v@pp.inet.fi> Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Alex Riesen committed
Oct 12, 2007 at 22:40 UTC
8f70a7657a9b459d6a4a3bcb1628c0fa6a6c22e0
1 file changed
+2
-1
remote.c
+2
-1
@@ -909,7 +909,8 @@ int get_fetch_map(struct ref *remote_refs,
909
rm->peer_ref->name);
910
}
911
912
- tail_link_ref(ref_map, tail);
912
+ if (ref_map)
913
+ tail_link_ref(ref_map, tail);
914
915
return 0;
916
}