Mercurial > hg > xemacs-beta
diff src/device-x.c @ 4404:80e07b006f9c
Prevent access to uninitialized variables in x_init_device.
2008-01-18 Jerry James <james@xemacs.org>
* device-x.c (x_init_device): Don't write to path or read from
format when neither has been initialized.
author | Jerry James <james@xemacs.org> |
---|---|
date | Fri, 18 Jan 2008 16:12:31 -0700 |
parents | 229bd619740a |
children | e34711681f30 |
line wrap: on
line diff
--- a/src/device-x.c Thu Jan 17 21:02:42 2008 -0500 +++ b/src/device-x.c Fri Jan 18 16:12:31 2008 -0700 @@ -703,6 +703,10 @@ path = alloca_extbytes (strlen (data_dir) + 13 + strlen (locale) + 7); format = "%sapp-defaults/%s/Emacs"; } + else + { + goto no_data_directory; + } /* * The general form for $LANG is <language>_<country>.<encoding>. Try @@ -730,6 +734,7 @@ XrmCombineFileDatabase (path, &db, False); } + no_data_directory: xfree (locale, Extbyte*); } #endif /* MULE */