diff options
| author | Tom Rini <[email protected]> | 2021-05-27 07:41:25 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-05-27 07:41:25 -0400 |
| commit | a0ecfa568d3309bb21869622bfc7147665c4260d (patch) | |
| tree | 977aa2f50c7cbc50ddf7dc4384e6126b38e293c1 /disk | |
| parent | f4b2786b80583c8b48245ac5f90fda47328f3a6c (diff) | |
| parent | cb6c9c83e2f1cb5b96851445dbf3dea8541cb212 (diff) | |
Merge branch '2021-05-26-assorted-bugfixes'
Diffstat (limited to 'disk')
| -rw-r--r-- | disk/part.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/disk/part.c b/disk/part.c index 5e7e59cf257..086da84b7f0 100644 --- a/disk/part.c +++ b/disk/part.c @@ -714,7 +714,11 @@ static int part_get_info_by_dev_and_name(const char *dev_iface, int ret; /* Separate device and partition name specification */ - part_str = strchr(dev_part_str, '#'); + if (dev_part_str) + part_str = strchr(dev_part_str, '#'); + else + part_str = NULL; + if (part_str) { dup_str = strdup(dev_part_str); dup_str[part_str - dev_part_str] = 0; |
