summaryrefslogtreecommitdiff
path: root/lib/clippy.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2021-02-17 17:01:06 -0500
committerQuentin Young <qlyoung@nvidia.com>2021-02-17 17:01:06 -0500
commit4da4b9d4f1e1a820909ec502e79b6c9ef2ed8dec (patch)
tree3af9aa7511a439a0c0dc9ba38a5b04ec97e46f67 /lib/clippy.c
parent95e336226e64aee0db909ce6d1ae2db9cbcb0901 (diff)
lib: fix some misc SA warnings
- clippy.c: fix valid memleak - defun_lex.l: suppress warnings in generated code - northbound_cli.c: suppress warning in eldritch libyang macro Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/clippy.c')
-rw-r--r--lib/clippy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/clippy.c b/lib/clippy.c
index 15cd9d7a4b..c655619b71 100644
--- a/lib/clippy.c
+++ b/lib/clippy.c
@@ -51,7 +51,8 @@ int main(int argc, char **argv)
#if PY_VERSION_HEX >= 0x03040000 /* 3.4 */
Py_SetStandardStreamEncoding("UTF-8", NULL);
#endif
- Py_SetProgramName(wconv(argv[0]));
+ char *name = wconv(argv[0]);
+ Py_SetProgramName(name);
PyImport_AppendInittab("_clippy", command_py_init);
Py_Initialize();
@@ -93,6 +94,7 @@ int main(int argc, char **argv)
for (int i = 1; i < argc; i++)
free(wargv[i - 1]);
#endif
+ free(name);
free(wargv);
return 0;
}