X-Git-Url: https://git.syn-net.org/?p=debian%2Fuanytun.git;a=blobdiff_plain;f=src%2Fstring_list.c;h=a4f4ab870c7b6368befed3df29eb61a9e839ffb7;hp=f23fcdc32a329ba5e1a9d7efea52545a05357abf;hb=e3f8e33112e2191999c6d6f6b6a767c72db800a0;hpb=b81b2c1954fe3e3317e6fa260c5ffdc9eeee966c diff --git a/src/string_list.c b/src/string_list.c index f23fcdc..a4f4ab8 100644 --- a/src/string_list.c +++ b/src/string_list.c @@ -20,8 +20,9 @@ * 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; } }