diff --git a/libraries/AP_Scripting/generator/src/main.c b/libraries/AP_Scripting/generator/src/main.c index 50d4788c63..6e28bd7a3b 100644 --- a/libraries/AP_Scripting/generator/src/main.c +++ b/libraries/AP_Scripting/generator/src/main.c @@ -2552,13 +2552,11 @@ void emit_docs(struct userdata *node, int is_userdata, int emit_creation) { } emit_docs_method(name, alias->alias, method); - - alias = alias->next; } - - fprintf(docs, "\n"); - free(name); + alias = alias->next; } + fprintf(docs, "\n"); + free(name); node = node->next; } }