summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2021-10-08 09:07:41 -0400
committerColin Walters <walters@verbum.org>2021-10-13 17:13:14 -0400
commitf355482e1f82ee26ba0f202ff6c05b1b14ddc858 (patch)
tree8d53e40c25102bb687fd91eae9bff20e5fcb65c1
parent3159e04980e567a918e532e168dea89112922460 (diff)
downloadostree-f355482e1f82ee26ba0f202ff6c05b1b14ddc858.tar.gz
static-delta: Fix probably not actually possible NULL deref
Flagged by `gcc -fanalyzer`. I didn't study this really deeply but I think it's not actually reachable. Anyways, let's catch it on general principle.
-rw-r--r--src/ostree/ot-builtin-static-delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c
index ff31b574..0ce3cefb 100644
--- a/src/ostree/ot-builtin-static-delta.c
+++ b/src/ostree/ot-builtin-static-delta.c
@@ -669,7 +669,7 @@ ostree_builtin_static_delta (int argc, char **argv, OstreeCommandInvocation *inv
return TRUE; /* Note early return */
}
- if (!command->fn)
+ if (!command || !command->fn)
{
static_delta_usage (argv, TRUE);
return glnx_throw (error, "Unknown \"static-delta\" subcommand '%s'", cmdname);