diff options
author | Joe Thornber <ejt@redhat.com> | 2018-06-08 13:40:53 +0100 |
---|---|---|
committer | Joe Thornber <ejt@redhat.com> | 2018-06-08 13:40:53 +0100 |
commit | d5da55ed85248adb066d293c2a1b863ce17d2779 (patch) | |
tree | e526dd2f773e3016a3acd3cb8e490ed11ba7c439 /device_mapper/libdm-string.c | |
parent | c78239d8605f333915543c0e0c3ccf4f4ef5ee8f (diff) | |
download | lvm2-d5da55ed85248adb066d293c2a1b863ce17d2779.tar.gz |
device_mapper: remove dbg_malloc.
I wrote dbg_malloc before we had valgrind. These days there's just
no need.
Diffstat (limited to 'device_mapper/libdm-string.c')
-rw-r--r-- | device_mapper/libdm-string.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/device_mapper/libdm-string.c b/device_mapper/libdm-string.c index 8bd6c2d15..62629c7ab 100644 --- a/device_mapper/libdm-string.c +++ b/device_mapper/libdm-string.c @@ -146,7 +146,7 @@ int dm_vasprintf(char **result, const char *format, va_list aq) { int i, n, size = 16; va_list ap; - char *buf = dm_malloc(size); + char *buf = malloc(size); *result = 0; @@ -161,20 +161,20 @@ int dm_vasprintf(char **result, const char *format, va_list aq) if (0 <= n && n < size) break; - dm_free(buf); + free(buf); /* Up to glibc 2.0.6 returns -1 */ size = (n < 0) ? size * 2 : n + 1; - if (!(buf = dm_malloc(size))) + if (!(buf = malloc(size))) return -1; } if (i > 1) { /* Reallocating more then once? */ - if (!(*result = dm_strdup(buf))) { - dm_free(buf); + if (!(*result = strdup(buf))) { + free(buf); return -1; } - dm_free(buf); + free(buf); } else *result = buf; |