summaryrefslogtreecommitdiffhomepage
path: root/cli-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2007-02-04 10:32:59 +0000
committerMatt Johnston <matt@ucc.asn.au>2007-02-04 10:32:59 +0000
commitfd304d763ace5074dc8e26b29fecc88d0d7ea006 (patch)
treef54c32bfbe83b44f715ab47a5863f84f585cfbe5 /cli-runopts.c
parentd9aeb2773e236e662c8b493f4bcee978f9908d7c (diff)
parent60d4cd599621a843095a0948c58c40b0ba286de2 (diff)
merge of 'b1dd3b94e60a07a176dba2b035ac79968595990a'
and 'bcb33fce2fad01a7626598209d43af3571bd86f0' --HG-- extra : convert_revision : 691c56da3db2685f58ea53540a73c1b79e7df9cd
Diffstat (limited to 'cli-runopts.c')
-rw-r--r--cli-runopts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli-runopts.c b/cli-runopts.c
index 7a672da..732d7a4 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -373,8 +373,7 @@ static void addforward(char* origstr, struct TCPFwdList** fwdlist) {
TRACE(("connectaddr == NULL"))
goto fail;
}
-
- connectaddr[0] = '\0';
+ *connectaddr = '\0';
connectaddr++;
connectport = strchr(connectaddr, ':');
@@ -382,8 +381,7 @@ static void addforward(char* origstr, struct TCPFwdList** fwdlist) {
TRACE(("connectport == NULL"))
goto fail;
}
-
- connectport[0] = '\0';
+ *connectport = '\0';
connectport++;
newfwd = (struct TCPFwdList*)m_malloc(sizeof(struct TCPFwdList));
@@ -417,6 +415,8 @@ static void addforward(char* origstr, struct TCPFwdList** fwdlist) {
newfwd->next = *fwdlist;
*fwdlist = newfwd;
+ m_free(str);
+
TRACE(("leave addforward: done"))
return;