summaryrefslogtreecommitdiff
path: root/examples/libsmbclient/testctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/libsmbclient/testctx.c')
-rw-r--r--examples/libsmbclient/testctx.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/libsmbclient/testctx.c b/examples/libsmbclient/testctx.c
new file mode 100644
index 0000000000..8820bc8342
--- /dev/null
+++ b/examples/libsmbclient/testctx.c
@@ -0,0 +1,17 @@
+#include <libsmbclient.h>
+
+void create_and_destroy_context (void)
+{
+ SMBCCTX *ctx;
+ ctx = smbc_new_context ();
+ smbc_init_context (ctx);
+
+ smbc_free_context (ctx, 1);
+}
+
+int main (int argc, char **argv)
+{
+ create_and_destroy_context ();
+ create_and_destroy_context ();
+ return 0;
+}