git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 'unknown filesystem' warnings in old inspection code (RHBZ#678231 RHBZ#666578).
[libguestfs.git]
/
daemon
/
glob.c
diff --git
a/daemon/glob.c
b/daemon/glob.c
index
4fe76f3
..
f2815ec
100644
(file)
--- a/
daemon/glob.c
+++ b/
daemon/glob.c
@@
-40,13
+40,17
@@
do_glob_expand (const char *pattern)
char **rv;
rv = malloc (sizeof (char *) * 1);
char **rv;
rv = malloc (sizeof (char *) * 1);
+ if (rv == NULL) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
rv[0] = NULL;
return rv; /* Caller frees. */
}
if (r != 0) {
if (errno != 0)
rv[0] = NULL;
return rv; /* Caller frees. */
}
if (r != 0) {
if (errno != 0)
- reply_with_perror ("
glob:
%s", pattern);
+ reply_with_perror ("%s", pattern);
else
reply_with_error ("glob failed: %s", pattern);
return NULL;
else
reply_with_error ("glob failed: %s", pattern);
return NULL;