Skip to content

Commit

Permalink
cmd_fs_usage: fix null ptr deref
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Aug 9, 2024
1 parent b00ac20 commit 8d75a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c_src/cmd_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void replicas_usage_to_text(struct printbuf *out,
unsigned dev_idx = r->devs[i];
struct dev_name *dev = dev_idx_to_name(dev_names, dev_idx);

durability += dev->durability;
durability += dev ? dev->durability : 0;

if (i)
*d++ = ' ';
Expand Down

0 comments on commit 8d75a97

Please sign in to comment.