Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=59a69cafc53b787755d454459eaaa4ad680cd4f8

commit 59a69cafc53b787755d454459eaaa4ad680cd4f8
Author: Priyank <priy...@frugalware.org>
Date:   Mon Jan 5 11:40:40 2009 +0530

netconfig.c: Fixed a couple of memleaks

diff --git a/netconfig/netconfig.c b/netconfig/netconfig.c
index 8383ffc..d70ade3 100644
--- a/netconfig/netconfig.c
+++ b/netconfig/netconfig.c
@@ -327,6 +327,7 @@ int run(int argc, char **argv)
profile = fwnet_parseprofile(fn);
FWUTIL_FREE(fn);
if(profile!=NULL)
+                       {
// unload the old profile
for (i=0; i<g_list_length(profile->interfaces); i++)
{
@@ -334,6 +335,8 @@ int run(int argc, char **argv)
if(!iface || !strcmp(iface, j->name))
fwnet_ifdown(j, profile);
}
+                               FWUTIL_FREE(profile);
+                       }
if(!strcmp("stop", argv[optind]))
{
if(!fwutil_dryrun)
@@ -361,6 +364,7 @@ int run(int argc, char **argv)
if(!fwutil_dryrun)
fwnet_setlastprofile(fn);
FWUTIL_FREE(fn);
+               FWUTIL_FREE(profile);
}
else
dialog_config(argc, argv);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to