Code

openvpn: free resource on error
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 17:27:56 +0000 (18:27 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 17:27:56 +0000 (18:27 +0100)
src/openvpn.c

index 7f94f51c24947747c00d073637f00135c0f031d4..93c8f1b58363fbf8f7a27f4f03a5b4077f74fee8 100644 (file)
@@ -702,6 +702,7 @@ static int openvpn_config (const char *key, const char *value)
                        char errbuf[1024];
                        ERROR ("openvpn plugin: malloc failed: %s",
                                        sstrerror (errno, errbuf, sizeof (errbuf)));
+                       sfree (status_file);
                        return (1);
                }
                temp->file = status_file;