daemon: ldm: Initialize glob_t struct before passing to glob.

Some implementations of glob might use fields in the struct, although
not glibc as far as I know.

Issue identified by Coverity.
This commit is contained in:
Richard W.M. Jones
2014-03-26 20:07:43 +00:00
parent fe97d5ed9c
commit 4caa2ea5ff

View File

@@ -58,6 +58,8 @@ get_devices (const char *pattern)
int err;
size_t i;
memset (&devs, 0, sizeof devs);
err = glob (pattern, GLOB_ERR, glob_errfunc, &devs);
if (err == GLOB_NOSPACE) {
reply_with_error ("glob: returned GLOB_NOSPACE: "