diff --git a/src/cmd/flux-module.c b/src/cmd/flux-module.c index bd7263ec75f6..d022e0d353d2 100644 --- a/src/cmd/flux-module.c +++ b/src/cmd/flux-module.c @@ -529,7 +529,10 @@ int cmd_list (optparse_t *p, int argc, char **argv) flux_rpc_t *r = NULL; flux_t *h; int n; + zhash_t *mods = zhash_new (); + if (!mods) + oom (); if ((n = optparse_option_index (p)) < argc - 1) { optparse_print_usage (p); exit (1); @@ -543,9 +546,6 @@ int cmd_list (optparse_t *p, int argc, char **argv) printf ("%-20s %-7s %-7s %4s %c %s\n", "Module", "Size", "Digest", "Idle", 'S', "Nodeset"); - zhash_t *mods = zhash_new (); - if (!mods) - oom (); topic = xasprintf ("%s.lsmod", service); if (!(r = flux_rpc_multi (h, topic, NULL, ns, 0))) log_err_exit ("%s", topic);