samba/samba-3.5.2-smbclient-segfa...

23 lines
665 B
Diff

diff -uPr samba-3.5.2.orig/source3/libsmb/cliconnect.c samba-3.5.2/source3/libsmb/cliconnect.c
--- samba-3.5.2.orig/source3/libsmb/cliconnect.c 2010-04-01 09:26:22.000000000 -0400
+++ samba-3.5.2/source3/libsmb/cliconnect.c 2010-05-01 14:05:58.171965275 -0400
@@ -1320,6 +1320,8 @@
char *tmp = NULL;
uint8_t *bytes;
+ *psmbreq = NULL;
+
req = tevent_req_create(mem_ctx, &state, struct cli_tcon_andx_state);
if (req == NULL) {
return NULL;
@@ -1455,6 +1457,9 @@
if (req == NULL) {
return NULL;
}
+ if (subreq == NULL) {
+ return req;
+ }
status = cli_smb_req_send(subreq);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);