diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
commit | 8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch) | |
tree | 1fdda006866bca20d41cb206767ea5241e36852f /libblkid/src/dev.c | |
parent | Adding debian version 2.39.3-11. (diff) | |
download | util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip |
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libblkid/src/dev.c')
-rw-r--r-- | libblkid/src/dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libblkid/src/dev.c b/libblkid/src/dev.c index c38ec3d..ca13f39 100644 --- a/libblkid/src/dev.c +++ b/libblkid/src/dev.c @@ -155,15 +155,13 @@ int blkid_dev_set_search(blkid_dev_iterate iter, if (!iter || iter->magic != DEV_ITERATE_MAGIC || !search_type || !search_value) return -1; - new_type = malloc(strlen(search_type)+1); - new_value = malloc(strlen(search_value)+1); + new_type = strdup(search_type); + new_value = strdup(search_value); if (!new_type || !new_value) { free(new_type); free(new_value); return -1; } - strcpy(new_type, search_type); - strcpy(new_value, search_value); free(iter->search_type); free(iter->search_value); iter->search_type = new_type; |