X-Git-Url: https://git.syn-net.org/?p=debian%2Fuanytun.git;a=blobdiff_plain;f=src%2Fstring_list.c;h=5e0ddf84143adfc314c9d2d8e56251a1678d65cf;hp=f23fcdc32a329ba5e1a9d7efea52545a05357abf;hb=4d61c93845abce1e45c4a41562ecb3fa4e3bdcc3;hpb=b81b2c1954fe3e3317e6fa260c5ffdc9eeee966c diff --git a/src/string_list.c b/src/string_list.c index f23fcdc..5e0ddf8 100644 --- a/src/string_list.c +++ b/src/string_list.c @@ -15,13 +15,14 @@ * tunneling and relaying of packets of any protocol. * * - * Copyright (C) 2007-2008 Christian Pointner + * Copyright (C) 2007-2010 Christian Pointner * * This file is part of uAnytun. * * uAnytun is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. * * uAnytun is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -91,8 +92,8 @@ int string_list_add(string_list_t* list, const char* string) tmp->next_->next_ = 0; tmp->next_->string_ = strdup(string); if(!tmp->next_->string_) { - free(list->first_); - list->first_ = NULL; + free(tmp->next_); + tmp->next_ = NULL; return -2; } }