summaryrefslogtreecommitdiff
path: root/sample/sample-plugins/simple/simple.c
diff options
context:
space:
mode:
authorBernhard Schmidt <berni@debian.org>2020-09-30 21:10:50 +0200
committerBernhard Schmidt <berni@debian.org>2020-09-30 21:10:50 +0200
commit5246174f27866c0e9e22844d998f3c97cac54050 (patch)
tree7cdcbac7dfb50f319c053b2f35325c5dc368bdd8 /sample/sample-plugins/simple/simple.c
parent57f0b7b331088e489e93ae89ee0aed98381d8806 (diff)
New upstream version 2.5~rc2upstream/2.5_rc2
Diffstat (limited to 'sample/sample-plugins/simple/simple.c')
-rw-r--r--sample/sample-plugins/simple/simple.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sample/sample-plugins/simple/simple.c b/sample/sample-plugins/simple/simple.c
index 950c547..60cfea4 100644
--- a/sample/sample-plugins/simple/simple.c
+++ b/sample/sample-plugins/simple/simple.c
@@ -80,6 +80,11 @@ openvpn_plugin_open_v1(unsigned int *type_mask, const char *argv[], const char *
* Allocate our context
*/
context = (struct plugin_context *) calloc(1, sizeof(struct plugin_context));
+ if (context == NULL)
+ {
+ printf("PLUGIN: allocating memory for context failed\n");
+ return NULL;
+ }
/*
* Set the username/password we will require.