On Wed, 2011-09-14 at 16:19 +0300, Jukka Rissanen wrote:
> +static ssize_t full_write(int fd, const void *buf, size_t len)
> +{
> + ssize_t byte_write;
> +
> + while (len) {
> + byte_write = write(fd, buf, len);
> + if (byte_write < 0) {
> + connman_error("failed to write config to vpnc: %s\n",
> + strerror(errno));
Nitpick: it's l2tp, not vpnc.
> + l2tp_name = g_strdup_printf("/var/run/connman/connman-xl2tpd.conf");
> +
> + l2tp_fd = open(l2tp_name, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);
> + if (l2tp_fd < 0) {
> + connman_error("Error writing l2tp config");
> + return -EIO;
Here we leak an 'l2tp_name' on error.
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman