diff options
author | itohy <itohy@pkgsrc.org> | 1999-12-23 06:14:50 +0000 |
---|---|---|
committer | itohy <itohy@pkgsrc.org> | 1999-12-23 06:14:50 +0000 |
commit | 2aceedd7cdf691c9fffb86ac5440efdc22bb00f0 (patch) | |
tree | 246f04207b222c12691bee1d14995e56ecd12964 /x11 | |
parent | 3afd4d8f155b9260e8e3f84083534c7de49c5de5 (diff) | |
download | pkgsrc-2aceedd7cdf691c9fffb86ac5440efdc22bb00f0.tar.gz |
Avoid free()ing NULL, just in case....
Diffstat (limited to 'x11')
-rw-r--r-- | x11/uwm/patches/patch-ad | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/x11/uwm/patches/patch-ad b/x11/uwm/patches/patch-ad index 3eb912289f5..2a4c2c87b62 100644 --- a/x11/uwm/patches/patch-ad +++ b/x11/uwm/patches/patch-ad @@ -1,7 +1,7 @@ -$NetBSD: patch-ad,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ +$NetBSD: patch-ad,v 1.2 1999/12/23 06:14:50 itohy Exp $ --- gram.y.orig Thu Sep 22 22:14:31 1988 -+++ gram.y Wed Dec 22 22:32:46 1999 ++++ gram.y Thu Dec 23 15:11:08 1999 @@ -111,24 +111,26 @@ | ';' ; @@ -142,15 +142,16 @@ $NetBSD: patch-ad,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ | /* empty */ { $$ = NULL; } ; %% -@@ -572,6 +574,7 @@ +@@ -572,6 +574,8 @@ setbinding(ICON, index, mask, name); if (context & WINDOW) setbinding(WINDOW, index, mask, name); -+ free(name); ++ if (name) ++ free(name); } /* -@@ -599,12 +602,13 @@ +@@ -599,12 +603,13 @@ char *mname; /* Pointer to menu name, if needed. */ { Binding *ptr; @@ -165,7 +166,7 @@ $NetBSD: patch-ad,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ switch (m & (LeftMask | MiddleMask | RightMask)) { case LeftMask: -@@ -771,9 +775,8 @@ +@@ -771,9 +776,8 @@ else { for(ptr = list; ptr->next; ptr = ptr->next) /* NULL */; ptr->next = link; |