diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-02 00:13:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-02 00:13:07 +0000 |
commit | 9ccb22ca28a69990f6aa8a89dfb8c536531cbda9 (patch) | |
tree | 530268690c33b8624cf721ff80b502e4d91d936a /sbin/pdisk/pdisk.c | |
parent | c58f787b3a0fc984307434d3bf6332b04bc894da (diff) |
snprintf; drahn ok
Diffstat (limited to 'sbin/pdisk/pdisk.c')
-rw-r--r-- | sbin/pdisk/pdisk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c index d3fe0c88b05..ce373b30fc3 100644 --- a/sbin/pdisk/pdisk.c +++ b/sbin/pdisk/pdisk.c @@ -1037,8 +1037,7 @@ do_display_block(partition_map_header *map, char *alt_name) return; } } else { - name = malloc(strlen(alt_name)+1); - strcpy(name, alt_name); + name = strdup(alt_name); } m = open_pathname_as_media(name, O_RDONLY); if (m == 0) { |