diff options
author | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:16:58 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:16:58 +0000 |
commit | 97abe8a548ff9ca940d568128b21813b8a253872 (patch) | |
tree | d38ea6a539b2cc4e70d9569e71985914818546cd /common/rfb/Hostname.h | |
parent | 8ed9009b4c4f497a95114d878334de3e13457bdd (diff) | |
download | tigervnc-97abe8a548ff9ca940d568128b21813b8a253872.tar.gz tigervnc-97abe8a548ff9ca940d568128b21813b8a253872.zip |
Replace rfb::strDup by safe_strdup and remove rfb::strFree in favor of free()
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3889 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/Hostname.h')
-rw-r--r-- | common/rfb/Hostname.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/Hostname.h b/common/rfb/Hostname.h index ebdf816f..d7ff664e 100644 --- a/common/rfb/Hostname.h +++ b/common/rfb/Hostname.h @@ -32,7 +32,7 @@ namespace rfb { if (!strSplit(&hi[1], ']', &hostBuf.buf, &portBuf.buf)) throw rdr::Exception("unmatched [ in host"); } else { - portBuf.buf = strDup(hi); + portBuf.buf = safe_strdup(hi); } if (strSplit(portBuf.buf, ':', hostBuf.buf ? 0 : &hostBuf.buf, &portBuf.buf)) { if (portBuf.buf[0] == ':') { @@ -45,7 +45,7 @@ namespace rfb { *port = basePort; } if (strlen(hostBuf.buf) == 0) - *host = strDup("localhost"); + *host = safe_strdup("localhost"); else *host = hostBuf.takeBuf(); } |