summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-04-09 06:42:15 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-04-09 06:42:15 +0000
commit821677f646bcaee8b5e4759d97909d05120de4d2 (patch)
treef18cf7d821e1a9ef80c4671332e7c49b16f1840c
parenta42a211aba369513bf31d6d34c966c36c1ccc714 (diff)
//bugs.freedesktop.org/show_bug.cgi?id=2942) attachment #2360XORG-6_8_99_2
(https://bugs.freedesktop.org/attachment.cgi?id=2360) Fix possible crash due uninitalised structure when "xman" opens the print dialog.
-rw-r--r--buttons.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/buttons.c b/buttons.c
index 59ad39b..13b1e70 100644
--- a/buttons.c
+++ b/buttons.c
@@ -178,8 +178,9 @@ InitPsuedoGlobals(void)
* Allocate necessary memory.
*/
- man_globals = (ManpageGlobals *)
- XtMalloc( (Cardinal) sizeof(ManpageGlobals));
+ man_globals = (ManpageGlobals *)XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
+ if(!man_globals)
+ return NULL;
man_globals->search_widget = NULL;
man_globals->section_name = (char **) XtMalloc( (Cardinal) (sections *