mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 08:38:04 +02:00
Sun bug #6739431: double free in _X11TransConnectDisplay()
Double free() introduced in bf53987eaf
After copying original_hostname to phostname, set original_hostname
to NULL, so we don't free the same pointer twice when we free both
original_hostname and phostname.
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6739431>
This commit is contained in:
parent
0877bc916a
commit
e7ece39afc
1 changed files with 1 additions and 0 deletions
|
|
@ -407,6 +407,7 @@ _X11TransConnectDisplay (
|
|||
if (reset_hostname && (phostname != original_hostname)) {
|
||||
Xfree (phostname);
|
||||
phostname = original_hostname;
|
||||
original_hostname = NULL;
|
||||
}
|
||||
#endif
|
||||
len = ((phostname ? strlen(phostname) : 0) + 1 + (dnet ? 1 : 0) +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue