Browse Source

smb2: destroy the context in case or errors from smb2_generic_cb

Errors can also be reported via generic cbs, that will cause the
vlc_smb2_mainloop to abort. In that case, we should destroy the smb2
context to fix the issue mentioned by 924c951518

(cherry picked from commit 960ef3f8ef)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
pull/135/head
Thomas Guillem 4 years ago
committed by Felix Paul Kühne
parent
commit
dd80816d8d
  1. 10
      modules/access/smb2.c

10
modules/access/smb2.c

@ -257,6 +257,16 @@ vlc_smb2_mainloop(struct vlc_smb2_op *op)
}
}
if (op->error_status != 0 && op->smb2 != NULL)
{
/* An error was signalled from a smb2 cb. Destroy the smb2 context now
* since this call might still trigger callbacks using the current op
* (that is allocated on the stack). */
smb2_destroy_context(op->smb2);
op->smb2 = NULL;
*op->smb2p = NULL;
}
return op->error_status;
}

Loading…
Cancel
Save