Skip to content

Commit 3381299

Browse files
authored
Merge pull request #12 from xyan264/double-free-fix
Fix 'switchtec list' double free memory issue
2 parents 0844a65 + b914e65 commit 3381299

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/microchip/switchtec-nvme.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ static int switchtec_pax_list(int argc, char **argv, struct command *command,
487487
if (ret > 0)
488488
index += ret;
489489

490+
global_device = NULL;
490491
switchtec_close(pax->dev);
491492
free(pax);
492493
}

0 commit comments

Comments
 (0)