mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +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;
|
alloc = needed;
|
||||||
|
|
||||||
buf->allocated += alloc;
|
buf->allocated += alloc;
|
||||||
new = realloc(buf->mem, buf->allocated);
|
new = dm_realloc(buf->mem, buf->allocated);
|
||||||
if (new)
|
if (new)
|
||||||
buf->mem = new;
|
buf->mem = new;
|
||||||
else { /* utter failure */
|
else { /* utter failure */
|
||||||
|
@ -436,7 +436,7 @@ static int handle_connect(daemon_state s)
|
|||||||
if (client.socket_fd < 0)
|
if (client.socket_fd < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!(baton = malloc(sizeof(struct thread_baton)))) {
|
if (!(baton = dm_malloc(sizeof(struct thread_baton)))) {
|
||||||
if (close(client.socket_fd))
|
if (close(client.socket_fd))
|
||||||
perror("close");
|
perror("close");
|
||||||
ERROR(&s, "Failed to allocate thread baton");
|
ERROR(&s, "Failed to allocate thread baton");
|
||||||
|
Loading…
Reference in New Issue
Block a user