diff options
author | Alasdair Kergon <agk@redhat.com> | 2010-09-30 21:06:50 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2010-09-30 21:06:50 +0000 |
commit | ac0252ca07e3be5bbb439c913d71c43f551e30ce (patch) | |
tree | 45d08af849560161cd6570fa0ff123cc770f1a70 /tools/dmsetup.c | |
parent | 0ca1492ca52365cc86aeaf623e370290446ba16f (diff) | |
download | lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.tar.gz lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.tar.xz lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.zip |
Add dm_zalloc and use it and dm_pool_zalloc throughout.
Diffstat (limited to 'tools/dmsetup.c')
-rw-r--r-- | tools/dmsetup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 88556670..f094f3fb 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -730,13 +730,11 @@ static int _message(int argc, char **argv, void *data __attribute__((unused))) for (i = 0; i < argc; i++) sz += strlen(argv[i]) + 1; - if (!(str = dm_malloc(sz))) { + if (!(str = dm_zalloc(sz))) { err("message string allocation failed"); goto out; } - memset(str, 0, sz); - for (i = 0; i < argc; i++) { if (i) strcat(str, " "); |