diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c
index 0213041..f867a8c 100644
--- a/src/openvpn/push_util.c
+++ b/src/openvpn/push_util.c
@@ -163,6 +163,7 @@
     {
         if (!send_control_channel_string(c, BSTR(&e->buf), D_PUSH))
         {
+            uninit_options(&o);
             return false;
         }
 
@@ -217,6 +218,7 @@
         update_vhash(m, mi, o.ifconfig_local, o.ifconfig_ipv6_local);
     }
 
+    uninit_options(&o);
     return true;
 }
 
diff --git a/tests/unit_tests/openvpn/mock_push_dependencies.c b/tests/unit_tests/openvpn/mock_push_dependencies.c
index 112bcfd..bf2ccf3 100644
--- a/tests/unit_tests/openvpn/mock_push_dependencies.c
+++ b/tests/unit_tests/openvpn/mock_push_dependencies.c
@@ -62,6 +62,13 @@
 {
 }
 
+void
+uninit_options(struct options *options)
+{
+    gc_free(&options->gc);
+    gc_free(&options->dns_options.gc);
+}
+
 bool
 options_postprocess_pull(struct options *options, struct env_set *es)
 {
