summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 596abb4)
raw | patch | inline | side by side (parent: 596abb4)
author | Marco Chiappero <marco@absence.it> | |
Fri, 25 Sep 2009 07:20:56 +0000 (09:20 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 1 Dec 2009 10:35:42 +0000 (11:35 +0100) |
Florian Forster ha scritto:
> Hi Marco,
Hi Florian,
> I'm too tired to have a look at this now, I hope to have some time in
> the next few days. I'll come back to you asap.
That's fine :)
But sorry, I forgot to recheck a small part of the code after adding and
moving some stuff around, please apply this patch too.
Regards,
Marco
> Hi Marco,
Hi Florian,
> I'm too tired to have a look at this now, I hope to have some time in
> the next few days. I'll come back to you asap.
That's fine :)
But sorry, I forgot to recheck a small part of the code after adding and
moving some stuff around, please apply this patch too.
Regards,
Marco
src/openvpn.c | patch | blob | history |
diff --git a/src/openvpn.c b/src/openvpn.c
index bf8511c312b920082077351b60684c8df40e7913..e65a00a697de5f512d7828bb4ed30336eb91e8d7 100644 (file)
--- a/src/openvpn.c
+++ b/src/openvpn.c
{
WARNING ("status filename \"%s\" already used, \
please choose a different one.", status_name);
+
+ sfree (status_file);
return (1);
}
}
}
- /* create a new vpn element since file and version are ok */
+ /* create a new vpn element since file, version and name are ok */
temp = (vpn_status_t *) malloc (sizeof (vpn_status_t));
temp->file = status_file;
temp->version = status_version;
vpn_list = (vpn_status_t **) realloc (vpn_list, (vpn_num + 1) * sizeof (vpn_status_t *));
if (vpn_list == NULL)
{
- char errbuf[1024];
- ERROR ("openvpn plugin: malloc failed: %s",
- sstrerror (errno, errbuf, sizeof (errbuf)));
- return (1);
+ char errbuf[1024];
+ ERROR ("openvpn plugin: malloc failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
+
+ sfree (temp->file);
+ sfree (temp);
+ return (1);
}
vpn_list[vpn_num] = temp;