diff options
author | Christian Pointner <equinox@spreadspace.org> | 2010-11-27 03:31:35 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2010-11-27 03:31:35 +0000 |
commit | 4793dc0638330ef5296c126d136489228d9521b0 (patch) | |
tree | 25623cd2a2388ec9ad16ac04107f0aaef91daac9 /src/string_list.c | |
parent | added tcp listener list (diff) |
listening on tcp sockets works now
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@8 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/string_list.c')
-rw-r--r-- | src/string_list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/string_list.c b/src/string_list.c index 192ff19..e197749 100644 --- a/src/string_list.c +++ b/src/string_list.c @@ -47,8 +47,11 @@ int string_list_add(string_list_t* list, const char* string) if(!list) return -1; - if(slist_add(list, strdup(string)) == NULL) + char* tmp = strdup(string); + if(slist_add(list, tmp) == NULL) { + free(tmp); return -2; + } return 0; } |