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:
222b7d3
)
Coverity: Check guestfs_inspect_get_product_name() != NULL before using.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 23 Aug 2011 15:47:18 +0000
(16:47 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 16 Sep 2011 14:48:40 +0000
(15:48 +0100)
(cherry picked from commit
fa44536b0ff12102c72ae0337e51d272f0fc2353
)
fish/inspect.c
patch
|
blob
|
history
diff --git
a/fish/inspect.c
b/fish/inspect.c
index
5e1948c
..
07af818
100644
(file)
--- a/
fish/inspect.c
+++ b/
fish/inspect.c
@@
-142,7
+142,7
@@
void
print_inspect_prompt (void)
{
char *name = guestfs_inspect_get_product_name (g, root);
- if (STRNEQ (name, "unknown"))
+ if (
name &&
STRNEQ (name, "unknown"))
printf (_("Operating system: %s\n"), name);
free (name);