openvpn plugin: use sizeof(*pointer) instead of sizeof(type)
[collectd.git] / src / openvpn.c
index f10b174..9490ac8 100644 (file)
@@ -712,7 +712,7 @@ static int openvpn_config (const char *key, const char *value)
                temp->version = status_version;
                temp->name = status_name;
 
-               vpn_list = realloc (vpn_list, (vpn_num + 1) * sizeof (vpn_status_t *));
+               vpn_list = realloc (vpn_list, (vpn_num + 1) * sizeof (*vpn_list));
                if (vpn_list == NULL)
                {
                        char errbuf[1024];