From e25b7a5e1efd03ccf2d82ee4a44ca2e6cd00f6fa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 16:47:18 +0100 Subject: [PATCH] Coverity: Check guestfs_inspect_get_product_name() != NULL before using. (cherry picked from commit fa44536b0ff12102c72ae0337e51d272f0fc2353) --- fish/inspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/inspect.c b/fish/inspect.c index 5e1948c..07af818 100644 --- 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); -- 1.8.3.1