[PATCH 3/7 rhel6-branch] bonding support: boot option
Vratislav Podzimek
vpodzime at redhat.com
Mon Aug 27 10:43:07 UTC 2012
On Mon, 2012-08-27 at 10:46 +0200, Radek Vykydal wrote:
>
> +int writeBondSlaveIfcfgFile(char *slave, char *master) {
> + char *ofile = NULL;
> + char *nfile = NULL;
> + FILE *fp = NULL;
> + char *uuid = NULL;
> +
> + checked_asprintf(&ofile, "%s/.ifcfg-%s",
> + NETWORK_SCRIPTS_PATH,
> + slave);
> + checked_asprintf(&nfile, "%s/ifcfg-%s",
> + NETWORK_SCRIPTS_PATH,
> + slave);
> +
> + if ((fp = fopen(ofile, "w")) == NULL) {
> + free(ofile);
> + return 2;
> + }
You should free nfile here too.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list