X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=door_daemon%2Fstring_list.c;h=a4f4ab870c7b6368befed3df29eb61a9e839ffb7;hp=f23fcdc32a329ba5e1a9d7efea52545a05357abf;hb=4ee2501ff864b8e15202ee814e8bafcc0c2adf6c;hpb=6773f3ff20c2826dc0f32e4d20b73572769f6e40 diff --git a/door_daemon/string_list.c b/door_daemon/string_list.c index f23fcdc..a4f4ab8 100644 --- a/door_daemon/string_list.c +++ b/door_daemon/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; } }