mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 14:40:31 +00:00
glob-util: add assert to silence coverity
CID#1491968
This commit is contained in:
@@ -63,6 +63,8 @@ int glob_first(const char *path, char **ret_first) {
|
||||
return k;
|
||||
|
||||
if (ret_first) {
|
||||
assert(g.gl_pathv && g.gl_pathv[0]);
|
||||
|
||||
char *first = strdup(g.gl_pathv[0]);
|
||||
if (!first)
|
||||
return log_oom_debug();
|
||||
|
||||
Reference in New Issue
Block a user