mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
lvmetad: use dm_ malloc wrappers
Use matching dm_ functions for internally used buffers.
This commit is contained in:
parent
2562968864
commit
e3d3921779
@ -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 */
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user