Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!sdcsvax!ucbvax!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: V11 fix #27, lib/X/XGetHints.c, freeing null pointers Message-ID: <871020170035.7.RWS@KILLINGTON.LCS.MIT.EDU> Date: Tue, 20-Oct-87 17:00:00 EDT Article-I.D.: KILLINGT.871020170035.7.RWS Posted: Tue Oct 20 17:00:00 1987 Date-Received: Thu, 22-Oct-87 02:49:43 EDT References: <8709260541.AA01664@sage.Berkeley.EDU> Sender: philip@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 69 Date: Fri, 25 Sep 87 22:41:37 PDT From: deboor%sage.Berkeley.EDU@berkeley.edu (Adam R de Boor) SYNOPSIS: XGetTransientForHint frees a null pointer if the hint is undefined. DESCRIPTION: The final "Xfree( (char *) data);" will free a null pointer if the hint isn't defined for the window... SYNOPSIS: XGetClassHint will also Xfree a null pointer if the property is undefined. DESCRIPTION: The final Xfree is at fault. FIX: to lib/X/XGetHints.c: *** /tmp/,RCSt1002488 Tue Oct 20 16:49:21 1987 --- XGetHints.c Tue Oct 20 16:17:51 1987 *************** *** 1,6 **** #include "copyright.h" ! /* $Header: XGetHints.c,v 11.16 87/09/09 15:42:48 swick Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, --- 1,6 ---- #include "copyright.h" ! /* $Header: XGetHints.c,v 11.17 87/10/20 16:17:25 newman Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 218,224 **** return (1); } *propWindow = None; ! Xfree( (char *) data); return(0); } --- 218,224 ---- return (1); } *propWindow = None; ! if (data) Xfree( (char *) data); return(0); } *************** *** 253,258 **** return(Success); } classhint = NULL; ! Xfree( (char *) data); return(0); } --- 253,258 ---- return(Success); } classhint = NULL; ! if (data) Xfree( (char *) data); return(0); }