diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-10-07 15:41:38 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-10-07 15:41:38 -0700 |
commit | e7ece39afc8e0adc3b6b1e70b337b98376754462 (patch) | |
tree | 1f24643a3a9807ea6499bcde4f8021606e3e1efd | |
parent | 0877bc916afbd1ff8f1833edc930b765ea783576 (diff) |
Sun bug #6739431: double free in _X11TransConnectDisplay()
Double free() introduced in bf53987eaf0fbd7f7627783fc39e7ee99e8361ba
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>
-rw-r--r-- | src/ConnDis.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ConnDis.c b/src/ConnDis.c index d40bab08..f32b0925 100644 --- a/src/ConnDis.c +++ b/src/ConnDis.c @@ -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) + |