p = strchr(sharename, '=');
if (p == NULL) {
d_printf("Server path not specified\n");
+ SAFE_FREE(sharename);
return net_rap_share_usage(c, argc, argv);
}
*p = 0;
ret = cli_NetShareAdd(cli, &sinfo);
cli_shutdown(cli);
+ SAFE_FREE(sharename);
return ret;
}
char *dst = NULL;
dst = SMB_STRDUP(c->opt_destination?c->opt_destination:"127.0.0.1");
+ if (dst == NULL) {
+ nt_status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
result = get_share_info(c, pipe_hnd, mem_ctx, level, argc, argv,
&ctr_src);
if (got_dst_share)
cli_shutdown(cp_clistate.cli_share_dst);
+ SAFE_FREE(dst);
return nt_status;
}