diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-04-15 00:10:10 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-04-15 00:10:10 +0000 |
commit | f74dafdf0b8e15cc1a92466f2c92facd470895b8 (patch) | |
tree | 432bc319e8f0cd489f6a2a283e1df0ee1db0aeab /xhost.c | |
parent | dc62a07856fb98a1c11abb6146146e91f520908b (diff) |
Coverity #610, #611: Various minor memory leaks. Bump to 1.0.1.xhost-1_0_1XORG-7_1
Diffstat (limited to 'xhost.c')
-rw-r--r-- | xhost.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); |