mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-11-23 01:34:06 +08:00
sample/sample-plugins/defer/multi-auth.c: handle strdup errors
Signed-off-by: Ilia Shipitsin <chipitsine@gmail.com> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> Message-Id: <20240708210912.566-3-chipitsine@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28886.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
b7c6920eab
commit
aef8a872aa
@ -206,9 +206,24 @@ openvpn_plugin_open_v3(const int v3structver,
|
||||
if ((args->argv[4]) && !args->argv[5])
|
||||
{
|
||||
context->authid = strdup(args->argv[1]);
|
||||
if (!context->authid)
|
||||
{
|
||||
plog(context, PLOG_ERR, "Out of memory");
|
||||
goto error;
|
||||
}
|
||||
context->test_deferred_auth = atoi_null0(args->argv[2]);
|
||||
context->test_valid_user = strdup(args->argv[3]);
|
||||
if (!context->test_valid_user)
|
||||
{
|
||||
plog(context, PLOG_ERR, "Out of memory");
|
||||
goto error;
|
||||
}
|
||||
context->test_valid_pass = strdup(args->argv[4]);
|
||||
if (!context->test_valid_pass)
|
||||
{
|
||||
plog(context, PLOG_ERR, "Out of memory");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user