1.1 --- a/client.c Sun Aug 01 18:12:58 2021 +0200
1.2 +++ b/client.c Sun Aug 01 18:14:32 2021 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Client code generation.
1.6 *
1.7 - * Copyright (C) 2019, 2020 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2019, 2020, 2021 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -146,9 +146,9 @@
1.13 ITEM_CLASS, fp);
1.14 }
1.15
1.16 - /* Return success. */
1.17 + /* Generate the epilogue. */
1.18
1.19 - fprintf(fp, "\n return L4_EOK;\n");
1.20 + fputs(client_function_body_epilogue, fp);
1.21
1.22 /* Free allocated strings. */
1.23
2.1 --- a/templates.h Sun Aug 01 18:12:58 2021 +0200
2.2 +++ b/templates.h Sun Aug 01 18:14:32 2021 +0200
2.3 @@ -1,7 +1,7 @@
2.4 /*
2.5 * Template output.
2.6 *
2.7 - * Copyright (C) 2019, 2020 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2019, 2020, 2021 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software; you can redistribute it and/or
2.11 * modify it under the terms of the GNU General Public License as
2.12 @@ -52,6 +52,10 @@
2.13 " if (err)\n" \
2.14 " return err;\n"
2.15
2.16 +#define client_function_body_epilogue \
2.17 +"\n ipc_message_free(&msg);\n" \
2.18 +" return L4_EOK;\n"
2.19 +
2.20 /* Client interface definitions for C++. */
2.21
2.22 #define client_interface_prologue_cpp \