moved raspberry and router gpio to pi_as_powerwitch on github
[svn42.git] / door_daemon / string_list.c
index e5e8a62..a4f4ab8 100644 (file)
@@ -92,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;
     }
   }