summaryrefslogtreecommitdiff
path: root/device_mapper/libdm-string.c
diff options
context:
space:
mode:
Diffstat (limited to 'device_mapper/libdm-string.c')
-rw-r--r--device_mapper/libdm-string.c12
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;