From: 刘建强 Date: Mon, 26 Jul 2021 01:36:26 +0000 (+0800) Subject: fix: Avoid wild pointers X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~2^2~21^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=28174970c74903a856a87542a54c0bef1dacbc86;p=ostree.git fix: Avoid wild pointers Pointer command is dangerous if there is no assignment. Log: Avoid wild pointers --- diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index d153dcec..bbaba8b0 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -148,7 +148,6 @@ ostree_run (int argc, OstreeCommand *commands, GError **res_error) { - OstreeCommand *command; GError *error = NULL; GCancellable *cancellable = NULL; #ifndef BUILDOPT_TSAN @@ -187,7 +186,7 @@ ostree_run (int argc, argc = out; - command = commands; + OstreeCommand *command = commands; while (command->name) { if (g_strcmp0 (command_name, command->name) == 0)