Clang reports possible null pointer due to process_register could
take the name from argv[0].  Fix it by adding ovs_assert check.

Signed-off-by: William Tu <[email protected]>
---
 lib/process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/process.c b/lib/process.c
index 3e119b59bfbc..254052f2c27d 100644
--- a/lib/process.c
+++ b/lib/process.c
@@ -172,6 +172,7 @@ process_register(const char *name, pid_t pid)
     struct process *p;
     const char *slash;
 
+    ovs_assert(name);
     p = xzalloc(sizeof *p);
     p->pid = pid;
     slash = strrchr(name, '/');
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to