summaryrefslogtreecommitdiffstats
path: root/common/network
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2009-09-04 10:16:58 +0000
committerAdam Tkac <atkac@redhat.com>2009-09-04 10:16:58 +0000
commit97abe8a548ff9ca940d568128b21813b8a253872 (patch)
treed38ea6a539b2cc4e70d9569e71985914818546cd /common/network
parent8ed9009b4c4f497a95114d878334de3e13457bdd (diff)
downloadtigervnc-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/network')
-rw-r--r--common/network/TcpSocket.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 7ceff0b0..7056a080 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -238,9 +238,9 @@ char* TcpSocket::getMyAddress() {
char* name = inet_ntoa(addr);
if (name) {
- return rfb::strDup(name);
+ return safe_strdup(name);
} else {
- return rfb::strDup("");
+ return safe_strdup("");
}
}
@@ -268,9 +268,9 @@ char* TcpSocket::getPeerAddress() {
char* name = inet_ntoa(addr);
if (name) {
- return rfb::strDup(name);
+ return safe_strdup(name);
} else {
- return rfb::strDup("");
+ return safe_strdup("");
}
}
@@ -451,7 +451,7 @@ int TcpListener::getMyPort() {
TcpFilter::TcpFilter(const char* spec) {
rfb::CharArray tmp;
- tmp.buf = rfb::strDup(spec);
+ tmp.buf = safe_strdup(spec);
while (tmp.buf) {
rfb::CharArray first;
rfb::strSplit(tmp.buf, ',', &first.buf, &tmp.buf);
@@ -541,9 +541,9 @@ char* TcpFilter::patternToStr(const TcpFilter::Pattern& p) {
in_addr tmp;
rfb::CharArray addr, mask;
tmp.s_addr = p.address;
- addr.buf = rfb::strDup(inet_ntoa(tmp));
+ addr.buf = safe_strdup(inet_ntoa(tmp));
tmp.s_addr = p.mask;
- mask.buf = rfb::strDup(inet_ntoa(tmp));
+ mask.buf = safe_strdup(inet_ntoa(tmp));
char* result = new char[strlen(addr.buf)+1+strlen(mask.buf)+1+1];
switch (p.action) {
case Accept: result[0] = '+'; break;