strtol(ctx->cdata + 7, NULL, 10);
} else if (!strcmp(ctx->name, DAV_ACTIVELOCK_TOKEN)) {
if (!strncmp(ctx->cdata, "opaquelocktoken:", 16)) {
- lock->token = xmalloc(strlen(ctx->cdata - 15));
+ lock->token = xmalloc(strlen(ctx->cdata) - 15);
strcpy(lock->token, ctx->cdata + 16);
}
}
if (lock->owner != NULL)
free(lock->owner);
free(lock->url);
-/* Freeing the token causes a segfault...
free(lock->token);
-*/
free(lock);
return rc;
int rc = 0;
int i;
+ setup_git_directory();
setup_ident();
remote = xmalloc(sizeof(*remote));
break;
}
+ if (!remote->url)
+ usage(http_push_usage);
+
memset(remote_dir_exists, 0, 256);
http_init();