git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6df64f4
)
Coverity: Check return value of malloc.
author
Richard W.M. Jones
<rjones@redhat.com>
Wed, 8 Jun 2011 21:07:36 +0000
(22:07 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Mon, 13 Jun 2011 13:22:00 +0000
(14:22 +0100)
(cherry picked from commit
3a5bd5aba23583e64bfaabc906ca95b0f9d37578
)
daemon/glob.c
patch
|
blob
|
history
diff --git
a/daemon/glob.c
b/daemon/glob.c
index
e94e4aa
..
f2815ec
100644
(file)
--- a/
daemon/glob.c
+++ b/
daemon/glob.c
@@
-40,6
+40,10
@@
do_glob_expand (const char *pattern)
char **rv;
rv = malloc (sizeof (char *) * 1);
+ if (rv == NULL) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
rv[0] = NULL;
return rv; /* Caller frees. */
}