summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-15 00:10:10 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-15 00:10:10 +0000
commitf74dafdf0b8e15cc1a92466f2c92facd470895b8 (patch)
tree432bc319e8f0cd489f6a2a283e1df0ee1db0aeab
parentdc62a07856fb98a1c11abb6146146e91f520908b (diff)
Coverity #610, #611: Various minor memory leaks. Bump to 1.0.1.xhost-1_0_1XORG-7_1
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac4
-rw-r--r--xhost.c9
3 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6df6149..b5816c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-04-14 Adam Jackson <ajax@freedesktop.org>
+
+ * xhost.c:
+ Coverity #610, #611: Various minor memory leaks.
+
+ * configure.ac:
+ Bump to 1.0.1.
+
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
diff --git a/configure.ac b/configure.ac
index a045509..fb02f50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
-# $XdotOrg: $
+# $XdotOrg: app/xhost/configure.ac,v 1.10 2005/12/15 00:24:07 kem Exp $
AC_PREREQ([2.57])
-AC_INIT(xhost,[1.0.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xhost)
+AC_INIT(xhost,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xhost)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/xhost.c b/xhost.c
index c64918d..276e370 100644
--- a/xhost.c
+++ b/xhost.c
@@ -1,5 +1,5 @@
/* $Xorg: xhost.c,v 1.4 2001/02/09 02:05:46 xorgcvs Exp $ */
-/* $XdotOrg: xc/programs/xhost/xhost.c,v 1.3 2004/07/27 06:06:06 herrb Exp $ */
+/* $XdotOrg: app/xhost/xhost.c,v 1.4 2005/06/18 08:03:35 alanc Exp $ */
/*
Copyright 1985, 1986, 1987, 1998 The Open Group
@@ -355,6 +355,7 @@ change_host(Display *dpy, char *name, Bool add)
name += 5;
#else
fprintf (stderr, "%s: not compiled for TCP/IP\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -365,6 +366,7 @@ change_host(Display *dpy, char *name, Bool add)
name += 6;
#else
fprintf (stderr, "%s: not compiled for IPv6\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -377,6 +379,7 @@ change_host(Display *dpy, char *name, Bool add)
name += 7;
#else
fprintf (stderr, "%s: not compiled for IPv6\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -387,6 +390,7 @@ change_host(Display *dpy, char *name, Bool add)
name += 5;
#else
fprintf (stderr, "%s: not compiled for DECnet\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -396,6 +400,7 @@ change_host(Display *dpy, char *name, Bool add)
name += 4;
#else
fprintf (stderr, "%s: not compiled for Secure RPC\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -405,6 +410,7 @@ change_host(Display *dpy, char *name, Bool add)
name +=4;
#else
fprintf (stderr, "%s: not compiled for Kerberos 5\n", ProgramName);
+ free(lname);
return 0;
#endif
}
@@ -419,6 +425,7 @@ change_host(Display *dpy, char *name, Bool add)
*cp = '\0';
fprintf (stderr, "%s: unknown address family \"%s\"\n",
ProgramName, lname);
+ free(lname);
return 0;
}
free(lname);