Plug some more small leaks.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 24 Mar 2005 03:10:31 +0000 (03:10 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 24 Mar 2005 03:10:31 +0000 (03:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13889 f5534014-38df-0310-8fa8-9805f1628bb7

disabled_protos.c
epan/addr_resolv.c
epan/prefs.c

index 4ccbe45e248cde8f0cc36705832ba7d2fa571ef7..ebda7a273b6b3c076fa47f47d7041a5f855c5b78 100644 (file)
@@ -102,7 +102,8 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
       *gopen_errno_return = errno;
       *gread_errno_return = 0;
       *gpath_return = gff_path;
-    }
+    } else
+      g_free(gff_path);
   }
 
   /* Construct the pathname of the user's disabled protocols file. */
@@ -130,7 +131,8 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
       *open_errno_return = errno;
       *read_errno_return = 0;
       *path_return = ff_path;
-    }
+    } else
+      g_free(ff_path);
   }
 }
 
index 9cb4e9d792704fd34b79b77cf7d0f536f5bda554..81e877765274dacc4508174a5666fabb3218104c 100644 (file)
@@ -1649,6 +1649,7 @@ host_name_lookup_init(void) {
   if (!read_hosts_file(hostspath) && errno != ENOENT) {
     report_open_failure(hostspath, errno, FALSE);
   }
+  g_free(hostspath);
 
 #ifdef HAVE_GNU_ADNS
   /* XXX - Any flags we should be using? */
index 2b492734c85e1389e1bbab3456878e8cf1f8bceb..9d083522f16006089c9537633fe371f1ac7d757a 100644 (file)
@@ -1079,6 +1079,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
       /*
        * It doesn't exist by the new name; try the old name.
        */
+      g_free(gpf_path);
       gpf_path = get_datafile_path(OLD_GPF_NAME);
       pf = fopen(gpf_path, "r");
     }
@@ -1156,7 +1157,8 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
       *pf_errno_return = errno;
       *pf_read_errno_return = 0;
       *pf_path_return = pf_path;
-    }
+    } else
+      g_free(pf_path);
   }
 
   return &prefs;