lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <847c519c55cc4479a6f47e7dc43a8a90@SN2PR03MB061.namprd03.prod.outlook.com>
Date:	Thu, 1 Aug 2013 14:35:36 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Olaf Hering <olaf@...fle.de>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Tools: hv: in kvp_set_ip_info free mac_addr right after
 usage



> -----Original Message-----
> From: Olaf Hering [mailto:olaf@...fle.de]
> Sent: Thursday, August 01, 2013 8:58 AM
> To: KY Srinivasan; gregkh@...uxfoundation.org
> Cc: linux-kernel@...r.kernel.org; Olaf Hering
> Subject: [PATCH] Tools: hv: in kvp_set_ip_info free mac_addr right after usage
> 
> ... to simplify error path in upcoming changes.
> 
> Signed-off-by: Olaf Hering <olaf@...fle.de>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> ---
>  tools/hv/hv_kvp_daemon.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index 418ac55..ba075e5 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -1299,6 +1299,7 @@ static int kvp_set_ip_info(char *if_name, struct
> hv_kvp_ipaddr_value *new_val)
>  	}
> 
>  	error = kvp_write_file(file, "HWADDR", "", mac_addr);
> +	free(mac_addr);
>  	if (error)
>  		goto setval_error;
> 
> @@ -1344,7 +1345,6 @@ static int kvp_set_ip_info(char *if_name, struct
> hv_kvp_ipaddr_value *new_val)
>  		goto setval_error;
> 
>  setval_done:
> -	free(mac_addr);
>  	fclose(file);
> 
>  	/*
> @@ -1358,7 +1358,6 @@ setval_done:
> 
>  setval_error:
>  	syslog(LOG_ERR, "Failed to write config file");
> -	free(mac_addr);
>  	fclose(file);
>  	return error;
>  }
> 
> 



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ