aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2002-08-01 03:15:29 +0000
committerJörg Mayer <jmayer@loplof.de>2002-08-01 03:15:29 +0000
commit9630bf353e2ca03bdce5d7ce00f184c898ba40cd (patch)
tree26e3986b7a2b9bf989d9f7089f0900839c860eb6 /tethereal.c
parentdb0d014224979e30a62f08cbeb8ae602ae55326e (diff)
Fix a few more memleaks found by valgrind (all deriving
from the get_persconffile_path mess). svn path=/trunk/; revision=5927
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tethereal.c b/tethereal.c
index f34cb7d990..df53d4dfe5 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.149 2002/07/17 00:22:12 guy Exp $
+ * $Id: tethereal.c,v 1.150 2002/08/01 03:15:26 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -313,7 +313,7 @@ main(int argc, char *argv[])
#endif
char *gpf_path;
- const char *pf_path;
+ char *pf_path;
int gpf_open_errno, pf_open_errno;
int err;
#ifdef HAVE_LIBPCAP
@@ -377,6 +377,8 @@ main(int argc, char *argv[])
if (pf_path != NULL) {
fprintf(stderr, "Can't open your preferences file \"%s\": %s.\n", pf_path,
strerror(pf_open_errno));
+ g_free(pf_path);
+ pf_path = NULL;
}
/* Set the name resolution code's flags from the preferences. */