Skip to content

Commit

Permalink
mgmtd: fix crash on "show mgmtd datastore-contents"
Browse files Browse the repository at this point in the history
When the command is called without specifying the datastore, it crashes.

Signed-off-by: Igor Ryzhov <[email protected]>
(cherry picked from commit 7a8b187)
  • Loading branch information
idryzhov authored and mergify[bot] committed Sep 28, 2023
1 parent 59aa33b commit 39b6e03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mgmtd/mgmt_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ DEFPY(show_mgmt_dump_data,
LYD_FORMAT format = fmt[0] == 'j' ? LYD_JSON : LYD_XML;
FILE *f = NULL;

if (datastore)
if (dsname)
datastore = mgmt_ds_name2id(dsname);

ds_ctx = mgmt_ds_get_ctx_by_id(mm, datastore);
Expand Down

0 comments on commit 39b6e03

Please sign in to comment.