commit - 758dc042e8fc2399dc58d96ce6d80b4a0adf4705
commit + 110104b65c5b511d6e99058e536c132ab962d863
blob - 0e18f194406f1c8fe2f30bab9b5c8a3a3c0a6e5f
blob + e4d0f25b9ed093ef2eedaffd7a65b3d05e786a3e
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
if (err)
goto done;
if (is_firstpkt) {
+ if (server_capabilities == NULL) {
+ server_capabilities = strdup("");
+ if (server_capabilities == NULL) {
+ err = got_error_from_errno("strdup");
+ goto done;
+ }
+ }
if (chattygot && server_capabilities[0] != '\0')
fprintf(stderr, "%s: server capabilities: %s\n",
getprogname(), server_capabilities);
goto done;
if (chattygot)
fprintf(stderr, "%s: my capabilities:%s\n",
- getprogname(), my_capabilities);
+ getprogname(),
+ my_capabilities ? my_capabilities : "");
is_firstpkt = 0;
}
if (strstr(refname, "^{}")) {