rpc = malloc(sizeof(struct rpc_context));
if (rpc == NULL) {
- printf("Failed to allocate rpc context\n");
return NULL;
}
bzero(rpc, sizeof(struct rpc_context));
rpc->encodebuflen = 65536;
rpc->encodebuf = malloc(rpc->encodebuflen);
if (rpc->encodebuf == NULL) {
- printf("Failed to allocate a buffer for rpc encoding\n");
free(rpc);
return NULL;
}
rpc->auth = authunix_create_default();
if (rpc->auth == NULL) {
- printf("failed to create authunix\n");
free(rpc->encodebuf);
free(rpc);
return NULL;