diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2013-06-18 21:57:14 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2013-06-18 22:11:31 +0200 |
commit | e3d39217794731402cedddb9cbaebf75c08c97ba (patch) | |
tree | c2b3f31bbf364ef44f1eff24a8e88b70bf865d5e | |
parent | 25629688643958e12859af0d53e818b8b111b4a9 (diff) | |
download | lvm2-e3d39217794731402cedddb9cbaebf75c08c97ba.tar.gz |
lvmetad: use dm_ malloc wrappers
Use matching dm_ functions for internally used buffers.
-rw-r--r-- | libdaemon/client/config-util.c | 2 | ||||
-rw-r--r-- | libdaemon/server/daemon-server.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libdaemon/client/config-util.c b/libdaemon/client/config-util.c index 34d755fae..d40e94c58 100644 --- a/libdaemon/client/config-util.c +++ b/libdaemon/client/config-util.c @@ -286,7 +286,7 @@ int buffer_realloc(struct buffer *buf, int needed) alloc = needed; buf->allocated += alloc; - new = realloc(buf->mem, buf->allocated); + new = dm_realloc(buf->mem, buf->allocated); if (new) buf->mem = new; else { /* utter failure */ diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 1db7ca761..df2c852ff 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -436,7 +436,7 @@ static int handle_connect(daemon_state s) if (client.socket_fd < 0) return 0; - if (!(baton = malloc(sizeof(struct thread_baton)))) { + if (!(baton = dm_malloc(sizeof(struct thread_baton)))) { if (close(client.socket_fd)) perror("close"); ERROR(&s, "Failed to allocate thread baton"); |